And this is why I suspect most of the people here don't have the same issue. Most D&D players just aren't that good at accomplishing what you state here. They DON'T know how to cast a "well-timed" spell or "turn the tide" of an encounter or problem using spells. Rather... they decide to prepare a few spells in the morning, and they cast them as the need arises. But there's no fanciful pre-cognitive sensitivity towards having "just the right spell" for "just the right time". They have some spells, they cast some spells... just like the martials have a weapon, and swing a weapon.
I mean, my spellcasting players are just as casual and lacking in tactics as my martial players. And as a result, they all have moments to shine, as well as moments of them thinking "Aw, man... if only I had done X!"
If someone finds their spellcasting players are hogging all the spotlight... perhaps it might just be as simple as the players who don't wish to delve deep into game and encounter theoretics are playing martial characters so that they they don't HAVE to think about them. Or their more ingenious players are taking spellcasters simply because they do have all the options at their disposal, and even if you raised the capabilities of martial characters it wouldn't go high enough for them.
I have the same experience.
I myself always gravitate instinctively towards playing a spellcaster as my first PC in every game or edition... probably because I am attracted by complexity and its tactical applications, and it is quite obvious that the sheer amount of spells available outnumbers the amount of actions that a martial character can ever do.
But when eventually playing a non-spellcaster, I think this is the time when you should take the opportunity to study combat or exploration rules better, since you won't have to spend time learning your many spells, and learn how to use those rules flexibly and efficiently. If the rules system is good, you can go quite far in this direction (incidentally, I think that if you don't allow
feats in 5e, you're significantly limiting this opportunity).
I know that people who aren't interested in thinking too much about it are often
suggested by typical DMs or the books themselves to "play a Fighter", and assume the player will just do the same attack action all the time. But in fact, I've seen also many Wizard players just shooting an attack cantrip over and over, and it is practically the same complexity as attacking with a weapon. You still have to read about how to use your non-cantrip spells, but if you compare a low-level Wizard focused on attack cantrips with a low-level Fighter focused on basic weapon attacks, you can see how the Wizard is almost a physically weaker version of the Fighter that is compensated for this loss with a few daily tricks.
But you can definitely be a casual spellcaster just like a casual martial-type, or you can play either more tactically. And 5e did a MUCH better job than 4e to create differentiated gameplay for them if you choose to go deep into the tactical approach. Probably there is still more depth potentially in a Wizard than a Fighter (the latter would never have as many feats or maneuvers or abilities as the former can have spells), but the point is that the responsibility is very much in the
players and whether their
DM is telling them that they actually have a choice, instead of dumbly suggest the old "play a Fighter" mantra.