It can be a tricky thing to balance being able to keep your family and yourself safe from burglaries and home invasions while also keeping them and/or others - especially children - safe and/or restricted from loaded weapons under normal circumstances. In almost all burglary and home invasion scenarios, an unloaded weapon serves virtually no purpose whatsoever. Of course, you never know when such a scenario will occur, so you either sacrifice the protection of a weapon or try to secure your loaded weapons as best as possible while still having easy access to them.
For those worried about crossfire issues, a pump shotgun is probably going to be your best bet. First, the sound of chambering a shell can be quite the deterrent in and of itself. Second, there is a variety of self-defense ammunition you can purchase which is designed to be relatively safe (non-lethal, possibly injury free) to persons in adjacent rooms, non-lethal but likely incapacitating at medium range, and lethal at close range. Such ammunition sacrifices effectiveness - it would likely take multiple hits to put down someone who is drugged out and attempting to kill you - in order to ensure better safety for persons who might be unintended targets; you don't have to worry about firing three slugs in order to put one through an attacker only to later discover that one of your misses went through three walls and struck your child on the other end of the house.
Since my wife and I don't have children to worry about and we have brick exterior walls, we keep a tactical 12 gauge pump next to the bed loaded but unhambered with slug/shot combo self-defense shells. The reason for having it unchambered is two-fold, both involving my wife: one, she is less likely to accidentally pull the trigger and fire off a round while fumbling to bring the gun to bear in a half-wakened state and, two, the sound of the pump may prevent her having to fire the weapon at all.
While I am confident in my ability to perform under pressure, especially after having been woken in the middle of the night, and my wife has spent a considerable amount of time at the range getting comfortable with our weapons, I'm not so certain as to how she might actually perform under such circumstances - especially if I'm not at home. And, of course, I sincerely hope I never have to find out.
For those worried about leaving loaded guns around the house, the best option is probably going to be biometric safety measures. While there are guns which can be purchased that have such measures integrated, the selection there is very limited. Currently, your best bet for availability and gun compatibility is going to be biometric gun safes. Ideally, you would go with multiple, small, gun safes dispersed throughout your home so that you have access throughout your home and you're able to most quickly access and bring your weapon to bear - which can be more difficult with larger gun safes. This, of course, only protects the weapon while in the safe. However, there are a number of products either just coming onto or set to soon come onto the market which will offer biometric safety that attach to and move with the weapon, as opposed to locking up the weapon, which either prevent initial firing or any firing of the weapon by an unauthorized user. While only currently available for a 1911,
Intelligun offers a biometric safety which prevents the gun from being fired at all by an unauthorized user. Another system, which I am anxious to see and which should support many more firearms from the get-go, is
Sentinil - a biometric trigger lock which detaches from the gun upon activation. This product looks interesting because it should be able to easily fit more firearms while requiring no modification to the weapon.