I don't see any inherent problem with "magic can do anything." Rather, the problem emerges in D&D when you start with "magic can do everything"--and then this means that a wizard player that games the system, games the DM, gets lucky, etc. can do "anything that needs doing" by casting a spell that takes a few seconds and has no appreciable cost or risk.
I'd rather that game balance efforts be focused on the costs and risks, rather than than the magic, which I agree with previous posters is really a campaign issue, not a system issue. The game should, in a perfect world, allow "magic to do anything" so that in your campaign you can decide that magic can do whatever subset of "anything" that makes sense.
Part of the problem is that 7 to 10 levels of spells (depending on how you count it) doesn't scale very well with D&D assumptions and Vancian casting. That is, you can easily set up a Vancian casting system that will work pretty well for 3 to 4 spell levels, but the more you range from that, the harder it is to balance.
You can't, for example, fix 3E casting by saying that a spell takes 1 round per spell level to cast. That's unreasonably tough for most 2nd or 3rd level spells, yet doesn't really account for the immense power of 6th+ level buffs.
I'm not sure if it would surmount the level scaling problem, but I'd like to see an attempt to put spells into tiers, an independent dimension from level. So say you have lesser and greater spells. The lesser spells of each level scale about like non-magical character abilities do. They work like D&D magic has usually worked. A wizard who has prepared a 6th level lesser spell in a 6th level slot can pop that thing out in a round, no real risks. But it is not any more impressive than what the fighter or rogue can do--merely different. In contrast, the greater spells have risks and costs on top of that, and these drawbacks scale rapidly with each level. They take a slot same as the lesser spells, but you don't cast one of these babies lightly. There are checks involved, and when you fail you risk hit point damage, ability score damage, temporary insanity, etc.
Think BECMI teleport versus 3E/4E teleports. A "lesser teleport" lets you pop over to that hill that you can see, easily, no risk. A greater teleport lets you go anywhere you know well on the planet, but you may arrive off-target and risk being entombed.
This would also be independent of cantrips/spells/rituals. Both lesser and greater spells can exist in all three. That gives three dimension to spell casting (with level). Now you can have things such as: Greater higher level cantrips - can do anytime you please, but cost time and gold, and backfires in your face if you screw up.
