It does indeed come down to DM style because there are loads of annoying things that can really stuff casters: like anyone who casts in combat drawing immediate attacks. Or how about feats like Mage Slayer, that mean that spell-casters always fail concentration checks when adjacent to you, and so cannot cast spells. What can you do if even low level monsters with the Mage Slayer feat get close to your casters: they are in serious trouble and only the mundane characters can dig them out of it.
Surprise attacks are deadly to most casters because they don't have time to react. I think wizards are incredibly vulnerable to being taken out in one hit. And if you think scry/buff/teleport is bad when the PCs do it, watch what happens when my monsters do..........
Then the PC casters have to waste spells every day preventing this sort of stuff, by having anticipate teleport or detect scrying up at all times: it really depletes them and makes them cranky. And when you know your enemies will also use force-cage, it gets annoying having to keep your disintegrate spells ready and unused for this.
It is actually my experience that the mage is the first character to go down in a high level fight very often, because they are an attack magnet. The same goes for the cleric/druid. As a DM, I just focus fire for a round or two and they usually go down and once they are down, the rest of the party start to sweat. Obviously, you don't always target the same characters but there are ways of causing mayhem if you think creatively. I seem to remember that casters in my games are VERY nervous about openly casting in combat for this reason.
There is also the problem of missing spell books: these are very vulnerable to lots of mishaps and without a book, the caster is stuffed.
And as for casters being able to do everyone else's job, who said that all traps over CR 25 have to be magical? I routinely include mundane traps that are well hidden and don't register to detect magic. Since ONLY Rogues can use search to find mundane traps over DC 21, not having a Rogue about is tantamount to suicide. Find traps is all very well, but who walks around with that up all the time, and if they do, more spells are wasted on this kind of preventative activity. If something is not magic, then the casters have virtually no way to tell if it is there and so no reason to cast a spell. By the time they find out they are wrong, they are dead......................
Magic item creation is also problematic if you maintain a strict campaign chronology so that 5 days of crafting means no adventuring at all for your character. This can be a very bad idea if world shaping events are happening, and one serious attack on your home base and all your time is wasted.
AS a DM, I just love PCs who create undead minions. Command Undead is a very low level spell and allows anyone, even a 3rd level wizard, to take command of your new minion automatically (no save) and turn it back on you. It doesn't look so clever when your Hydra Skeleton turns around and starts battering you with all your protection out in front. Indeed, a wizard can go down in one round from this sort of tactic. I love including a few low level casters in any set of monsters for just this sort of thing. If the party have been really "clever" they will have a number of undead minions with them for me to play with

. Oddly, my PCs don't do this anymore............................