I've served aboard more than one aircraft carrier and more than one submarine, and have two sets of deck plans (one for a Manatee and one for a Mark VII landing craft) down on the fan design board. I'm very interested in this discussion, and agree with The_Caveman that the over scaling isn't that bad, at least not on the smaller ships I've drawn up so far. Auxiliary equipment takes up a lot of space (life support, back up generators, pumps, fans, water recycling, etc. etc.).
As for your specific question about aircraft in the hangar bay, what you don't see are the many shops for doing maintenance on components, and yes, there's even a test bench for a dismounted engine if that's necessary. If you have to remove an engine, it requires some creative parking, probably with some of the aircraft on the roof (flight deck) to make room. You also don't see the huge amount of space for spare parts, fuel, and ordnance. Aircraft carriers are huge, but just about every space has something crammed into it. You'll also note that every one of those aircraft folds up in some way. Even in the hangar bay, space is at a premium.
As for submarines, they are not huge. More space is given to equipment than personnel, and the trend for the more modern boats I've seen is to make that situation worse. The trick isn't necessarily finding room for their racks, but also for the galley, mess deck, and heads. If you check my Mark VII plans, I crammed 36 personnel into just under half of a 14x8x5 meter space (the top half). Triple stacked racks on a submarine aren't easy to climb into (nor are they on aircraft carriers, but the carrier racks have more head room).