I think you said something about inheriting a Mossberg 500. A short barrel for that gun won't set you back very much, and will provide you with a marvelous home defense tool (assuming it is chambered in either 12 or 20 gauge). Save the longer barrel for using the same gun in the field. I think G1 has a sticky with a lot of helpful information about shotgun loads for defensive purposes. If I had a choice of firearms for the circumstance you shared, I'd MOST like to be holding a trusty scattergun loaded with appropriate ammunition.
The primary value of a handgun is...well...handiness. It's something you can actually wear on your person. One noted firearms authority says, "The purpose of a handgun is to fight your way to a long gun", or something to that effect. I also like a double action revolver for simplicity and reliability. As for the .38 Special being too wimpy...well, ALL the service cartridges are pretty wimpy by shotgun or centerfire rifle standards. Modern self-defense ammunition for handguns from .38 Spl-.45 ACP leaves very similar wound patterns. Being able to hit the desired target accurately (preferably multiple times) is more important than any difference in ballistics. Medium framed revolvers (usually Smith & Wessons) have been traded in large numbers for upgrades to semi-auto pistols. They can often be found at bargain prices in perfectly sound, mechanical condition. A simple 4" .38 Special loaded with any of the traditional +P "FBI" loads (158 gr.Lead Semi-Wadcutter, Hollow Point) is pretty good medicine for self-defense. Lots of LEOs who've been "over the mountain and seen the elephant" may chime in.
Lastly, and most importantly, there are ways to have firearms BOTH prepared for action AND secure from little ones. Each of these issues is critically important. We all want firearms to be a threat to the bad guys, not our own loved ones.