Most spells aren't "balanced" when you apply them in a vaccuum.
Spells seem very powerful when you create a hypothetical situation where the effect just happens. For instance, in the second example you provided, a few things happened without you mentioning them:
- The Lich failed his save. I should mention that this is incredibly unlikely.
- The Warlock didn't expend all of his spells before reaching the final encounter.
- The Warlock didn't get killed or incapacitated by a previous encounter, or get level drained by a trap, or get silenced during the encounter, or anything else that would prevent him from casting the spell at the right time.
Wish offers some nice benefits, but most of the safe ones are one-upped by magical items, namely the stat bonuses. Truly world-impacting effects are possible, but liable to twisting (which is arguably encouraged by the book) by the GM through semantic loopholes. Effectively, wish allows the caster to be GM for a moment.. except the change he makes is still vetoed by the actual GM. The game is only ever as "unbalanced" as the GM (and by association, the players, ideally) wants it to be.
Keep in mind: the GM is effectively the one true God of your fantasy universe
When the game gets to high level play, the GM has more responsibility, in my opinion, because it's much easier for the players to get what they want. Not only should the players get better at playing the game as their characters level up, but the GM should also get better at GMing. If true polymorph is making the game too easy, then the game will suffer, not just for the GM, but the players also. With rare exceptions, people don't want to play games where there's no challenge. It's the GM's job to make sure that you are challenged once you get access to true polymorph, and the game provides tools to do that without the dreaded GM fiat.