Not to mention you have to a) have that spell in your book, and b) have that spell prepped.
I swear, 90% of those types of arguments always fail to take those things into account, and assume that wizards have all the spells in the book available all the time.
Actually that's a huge part of it. 5e, like Classic versions of D&D is very much a resource-management game. If you're not managing a scarce, important, resource, you're barely playing the game at all. 5e goes pretty far in recognizing that, and gives every class and almost every sub-class some such resource management. Even the Champion & Battlemaster have some short-rest-recharge resources to manage. Thing is, they're strictly combat resources.
It's not that any can't contribute at all in each pillar, it's that there's a few sub-classes that don't contribute meaningfully - that, in essence, aren't playing the game in those pillars.
Well then, I suppose it's a good thing that the exploration and interaction pillars can be done by role-playing, and aren't mandatory reliant on a mechanic, like combat is.
That would be a bad thing, if it were true, because it would mean the game was failing to represent the character's abilities in exploration & interaction.
When you resort to use the players 'RP' as a resolution mechanism, you lose all connection to the character, itself. It's not you playing a character negotiating with bandits or exploring a ruin, it's /you/ hypothetically negotiating with bandits or exploring a ruin, yourself. Which is just lame.
Fortunately, the game does give you stats and proficiencies so you and the DM have some guide of how your character performs in those pillars, at a base-line, before any resources are expended. And, really, there's not a whole lot to choose among classes at that base-line. Some have certain skills in-class, others more or more useful skills. Two classes have Expertise. A few have situational special abilities. That's about it until you get into managing expendable resources.
As has been pointed out up-thread, the bottom-of-the-barrel performance with any check has been raised (the DC bar lowered in 5e) to the point that any character can some base-line contribution, barely differentiable from any other character some fraction of the time (unless you look at the natural d20 roll). What that means is that any given check might be delivered on by any given character based on the relative die rolls. That doesn't mean much, but much has been made of it up thread.
Where things get interesting, where you actually start making a contribution and genuinely playing the game, is when you contribute something more than your luck with a d20 - when you decide whether & how to use a managed resource.