I'm A Banana
Potassium-Rich
It is nearly impossible because flying doesn't exist in a vacuum.
Nothing does. If "existing in a vacuum" is a prerequisite for "having balanced rules," then it's impossible to have balanced rules for anything.

This is a fantasy game, and there are iconic tropes like the knight in shining armor and big, strong, stupid ogres. Being iconic, these tropes need to have value, and the concept of many of these things doesn't really allow them to deal with flight very well. The knight can pull out a bow and the Ogre can throw a spear or rock, but in the big picture that really isn't what they do, and certainly not what they do best.
...and flying witches, and bird-people, and giant eagles, and pegasi, and...
What makes a "big stupid ogre" trope more important to support than a "pegasi-mounted warrior" trope?
I'm of the mind that the two can coexist, just like magic missiles and crossbows do, we just maybe need to account for flight in a way that the game hasn't done particularly well to date.
I mean, the game certainly values flight. Flight exists in all editions of D&D. So do ogres. They're not inherently incompatible.
One of the iconic abilities of the D&D Rogue is the ability to climb walls. Flight all by itself completely trumps the ability of Rogues to Climb Walls.
Well, since a stepladder can trump that ability, I don't think that ability is very significant. I beat an "iconic" D&D rogue every time I get something out of a high cupboard. I am a big fat hero.
Climbing walls is very niche.
Cheap and accessible flight changes the game at a fundamental level, either devaluing core fantasy concepts or forcing you to tack on solutions to flight that don't really belong.
Climbing walls is not a core fantasy concept, and nothing is inherent to big dumb ogres that makes them incapable of swatting down flying characters (King Kong did quite a good job, even though he eventually lost).
Impossible you say? Nothing is impossible with science!

...or in this case, with good game design.
Heck, I've mentioned one possible way of addressing it already. It's probably not great for most D&D games, but it's clearly not impossible.