Coalminer - get the 9mm. Don't ever count on some magical combination of cailber and bullet to take the place of basic defensive handgunning skills - that's what practice (and more practice and more practice) is for. The 9mm will work just fine if you do your job right. Nothing works right if you don't plant the bullet where it belongs.
That being said, a double action semi-auto may not be the best piece to start with, unless you are sold on the S&W MP. I prefer and appreciate the Browning High Power in 9mm - it feels natural in my hand.
The magazines of two different caliber pistols may interchange but that does not mean they will feed different caliber cartridges properly, so 'no' they might not interchange.
I don't consider the 40 S&W a better round than the 9mm, it is simply one more millimeter in diameter. They are both the same cartridge length so you can only get just so much out of a 10mm case that is the same length as the 9mm case. The 9mm is the less expensive cartridge to shoot.
The FBI loadings in the 10mm cartridge were/are at the 40 S&W level, which is why many refrred to the 40 as the 40 short and weak. The feds were concerned about through and through penetration and liability and that's why they came up with 40 S&W power levels.
Get yourself the 9mm and don't look back. Practice with it until you feel comfortably proficient and then keep practicing and plinkin'. HTH. Mikey.