I think it's an open question, and to be honest perhaps superfluous in most cases but ultimately Aurora is a roleplay game after all...
But in practice, if I don't have sufficient leaders, I don't build fewer ships or ground units, but I do change how those are designed. Without sufficient commanders, the command modules of ships will be removed so you don't have your AUX, CIC, etc. which you might actually like to have, at a certain point these modules are more impactful than adding another railgun, sensor, or what have you.
For ground units what changes is usually the base formation size - if I have 100 ground officers I will build 100 formations at 20,000 tons each rather than 400 formations at 5,000 tons each. I suppose practically the effect is not too great if it is the same mass of troops either way, though. Otherwise you would see with fewer commanders a shift to less-numerous, more costly formations with high armor values, gene-modding and other capability modifiers, etc. On one hand this is a reasonable game-mechanics response to officer scarcity, but on the other hand this does mean tangibly that the amount of officers you generate can limit your options for force composition.
So ultimately it is an open question, and the answer is not either/or. That is, we are not asking whether or not to build an additional academy (usually), rather asking how many resources should be dedicated to expanding our leadership versus other aspects of the empire. To be simplistic about it, if we ask whether to dedicate 100% of our production towards academies or towards factories, obviously the former would be very silly and the latter preferable. But if we are asking whether to go 100% for factories or, say, 90% into factories and 10% into academies, we may find that having enough officers to command our entire force provide enough added value to justify that 10% even though our direct production capability is only 90% of what it could have been. Again, an oversimplified example but it illustrates the point, I for one would never stop building academies entirely but rarely would I ever put more than 5-10% of production capacity towards them.