The M&P was designed around the 40 S&W cartridge, it's not an upscaled 9. The 9mm barrel is simply thicker so it fits essentially the same slide. The 9mm slide is machined with a little less metal taken out in order to accommodate portions of the 9mm barrel. So essentially an M&P9 is in theory stronger than an M&P40.
Both are made to handle the 35,000 psi SAAMI specs for their respective cartridges. 9mm +P is actually 38,500 and is not recommended for everyday use, although it's OK for carry purposes.