Some things to think about....
Shotguns: Sounds like a good idea up front however there are couple problems. They don't lend themselves to manuevering in tight spaces too well. A short barrel can help but a handgun is much easier to deal with most of the time in a building search situation. Second problem is securing your weapon should you have to do so to deal with some loser you caught in your house. Granted you probably won't be handcuffing anyone but....if you need to go hands free there is no easy way to do so with a shotgun. So say you have to call 911 once you've got everything under control, if you're alone you have to one-hand the shotgun. They are generally pretty difficult to swing, aim and fire one handed. I know someone will post that the bad guy will be down so it's a non-issue. That's not actually very likely, when it comes to it, most folks won't just shoot someone who just gave up or was just wounded and has now just given up. So you may have to cover the guy while calling 911. That's hard to do with a shotgun while one-handing it. Yes racking a round into the chamber of a shotgun is intimidating, but if you've made the decision to confront the bad guy with a gun, be prepared to use it. Don't assume they care about hearing a shotgun rack, if they are breaking into your house during a time when most folks are home, they have probably made the decision to use whatever weapon they brought to the party.
Caliber: Within reason shot placement is more important than the caliber you're using. So the difference between 9mm, .40 and .45 isn't as important as the weapon you're most comfortable and experienced with. There are penetration issues but this can be addressed to a certain degree with ammunition choices. All of these rounds have a chance of penetrating walls. You as the shooter must assume that it will and deal with it accordingly. If your family is behind a wall the bad guy is in front of, you have no shot and that's just how it is. Move until you do. The same applies with exterior walls. As a side note on frangible ammo. The big problem with this stuff is the chance for under penetration of the suspect. I prefer the more standard hollow point style ammo and use muzzle discipline to prevent collateral damage. It's really important to end the fight asap, good penetration and bullet performance along with shot placement are key.
In terms of noise levels, you won't hear the shots you fire under those circumstances. Noise levels of your gun are irrelevant.
Training is incredibly important. You need to learn a good combat style of drawing, shooting, holstering, reloading and malfunction drills. Then you need to practice them...alot. Many folks don't realize that the first thing you lose during high stress situations in terms of ability is fine motor control. Shooting a firearm requires alot of fine motor control. Expect your accuracy to tank. This means you're operating off muscle memory and it is incidentally why bad guys and good guys routinely miss each other from less than 10 feet in gunfights. You build those skills and work on them until you don't have to think about how to do it, you just do it. Assess, draw, point, fire. Not much aiming goin on there....which is why you don't take a chance shooting near a wall your family is concealed behind.
The second part of training is learning what's ok and what's not ok. The castle doctrine isn't a magic bullet that absolves you of responsibility. Your individual state has laws regarding self defense and you need to learn them. In general a reasonable person fearing death, sexual assault or maybe serious physical injury can use deadly force to defend themselves or others (ex. your family). It's important that you know laws in your specific area.
Gunsafes: These are nice but if you're buying a firearm for home defense and keeping it in the gunsafe or even unloaded you may as well not buy the thing. You likely won't have time to get to it. So then the issue becomes child safety. Lots of stuff to think about.
Oh and bad guys usually don't just fall over with a couple hits. Be prepared to shoot until they are down, this may take many hits depending on mindset and mind altering drugs in the bad guy. Why do you see stories in the news of police shooting bad guys multiple times? Because it often takes multiple hits to shut humans down, so train with that in mind.
And yes, lawyers are for suspects. States spend millions of dollars giving free legal service to the most violent criminals. They spend comparitively little giving any service to victims whatsoever.