I rarely use all of my starbase upgrade slots. It costs a lot of resources that could be put into ships instead. This is particularly true for 'trade' starbases; unless you have good reason to think the enemy is going to be raiding that sector, don't bother putting on anything except civilian upgrades.
So do you mean to say that the starbase actually rebuilds squads faster? Keep in mind that the hangars are being repaired by both repair bays and the docking booms ability so they won't go down too fast, even to structure busters. If the enemy is there with his fleet, he can probably make mincemeat of your flak ships, but it'll take him longer to wear down the hangars.
Hangar bays function like carrier cruisers, meaning they require antimatter to build fighters. Hangar bays don't have all that much antimatter and they don't regenerate quickly, and once their antimatter is drained they're effectively out of the fight.
Starbases function like capital ships - building fighters costs no antimatter. They'll keep rebuilding pretty fast. This is worthwhile even if the enemy kills all your strikecraft and has space superiority, since you can micro a bit and keep your squadrons docked until they've rebuilt enough to make a difference.
Of course, starbase upgrades cost more per fighter. It's up to you. *shrug*.
One clever bit you can do with the hangar defences is to hold all your fighters and let your flak guns/ships go to work on the enemy Fighter squadrons. This will cost you some damage, but it's more efficient if you are outnumbered.