I bring this up because in RPGs I actually enjoy the classic fighter/mage/rogue archetypes. However it seems like more and more with 'modern RPGs' you almost get punished for picking them depending on the situation.
Can you give some examples where that happens, and what you mean by getting punished? Honestly, I can't recall any cRPGs that I've played where fighter/cleric/rogue/wizard (or equivalent, depending on the game) was not perfectly viable for completing the game - heck, Fighty McFighterson is often the first companion you run into in most cRPGs, with Stabby McSneaky and Whitebeard the Wizard coming 2 minutes later.
That said, though, I do admit that combo may not (is probably not) optimal, but there's two things going into that. The first is that, even if it can be achieved, perfect balance is not a state to strive for. Yes, it is perfectly balanced if the fighter's heroic blow", the paladin's "holy strike" and the barbarian's "mighty slam", all do the exact same thing but it's also boring and redundant. If two classes are functionally equivalent in what they can do, then they are the same class and one should be removed. But, that's really a state we don't need to worry about because there is always going to be some imbalance in any reasonably complex system - and that's why fighter/cleric/rogue/wizard is probably not optimal. Take something like Owlcat's Wrath of the Righteous - you've got 26 base classes (each with a half dozen subclasses) and 13 prestige classes without even getting into the epic level paths or mixing and matching with multiclassing. Optimal likely doesn't even exist in that case because changing the class of one party member will add and remove capabilities making the other classes more and less effective.
MMOs are an entirely different monster, but the good news there is you probably only need to wait a month or two for the next balance pass and the "meta" will change again. That said, though, that is a huge problem with modern gaming which has nothing to do with the developers or even the games. Take any game, give it a week, and some turbonerd on the internet will have done the math to figure out that Class X does 2.3 more damage per second than Class Y, in optimal conditions, and will make a video on it. Then, people will start sharing the video all over the internet. And 2 days later, many people will say "LOL! You're such a noob! Why are you Class Y when Class X is objectively superior? Get out of here, we don't want you and your vastly subpar DPS in our group!" even though Class Y is still more than capable of clearing all the content without difficulty. If anyone figures out a way to actually solve that problem, I will happily support their efforts to become the Supreme Ruler of Mankind in any way I can.
I'm a couple of days late checking this thread but will give some thoughts on the topic in general as well as address some of the specific examples brought up.
I remember how powerful an extra fighter or two could be in Baldur's Gate 2
BG2 didn't function like a traditional D&D game/party. Not only if the protagonist literally powered by the Divine but almost every single companion has some unique twist that makes them stand out from their actual class and subclass.
Minsc is more than just a Ranger, if he even is one because he functions more like a Fighter. His internal party interactions can lead him to adopt Aerie as his new witch after the death of Dynaheir between BG 1 and 2 which will lead to moments where Minsc can enter a berserker rage, despite not being an actual Berserker, if Aerie gets hurt too much. There is also Boo, who turns out to be exactly what it says on the tin. A miniature giant space hamster, and not just a regular hamster some brain adled strongman has been convinced otherwise. Most Rangers don't get played like this, Minsc functions better as a two handed tank/dps than the animal attuned archer/"ranger" stereotype or dual wielding swords type and apart from the protagonist, Keldorn, Sarevok, and a couple of others, Minsc potentially one of the single best melee characters you can get. As a Ranger.
Speaking of Sarevok, he's quite possibly the best melee character in the game again because of unique traits which also require several significant decisions to be made in order to make use of them.
First, you need to resurrect him in Throne of Bhaal and recruit him. Second, you need to give him his sword back, a sword you originally get all the way back in the very first dungeon in BG2, but only if you do the side quest for the Djinn and return its lamp from Irenicus' chambers. Then you have to hold on to the sword for the entirety of BG2, although others can use it in the meantime, because it's not until ToB where giving it back to Sarevok will let him return some of its lost power and upgrade it from a +2 2h sword to a +4 that only Sarevok can then wield. By this point in the trilogy you should be able to take epic levels which means whirlwind and greater whirlwind in the case of Sarevok, and Minsc. Add on to that Sarevok's Deathwalker ability where he can literally one shot almost anything and you can see why he's the best melee character in the game outside of the protagonist who only beats him due to both plot and broken class choices.
And those broken class choices are a multiclassed Kensai/Mage that gain martial abilities from the Fighter subclass in addition to armour bonuses that don't need actual plate, the aforementioned WW and GWW epic feats, and access to various Mage spells to further increase your abilities as well as simply cause damage should you so wish. Or even Wish. Simulacrum, Contingency, and others like Haste, Mage Armour, let you further buff yourself to absurd levels because the game design accidentally permits it, but then you're meant to be a demigod according to plot so acting like one this way isn't really that out of character.
It's the same error Dragon Age Origins made with the Mage subclass Spirit Warrior that permits Mages to use their INT stat to work for both melee weapons and wearing armour when it would otherwise require STR. You can then again couple martial and magical abilities for a synergy that outperforms everything else in the game.
Similar to being powered by the Divine in Baldur's Gate, Mages in Dragon Age really are that terrifyingly powerful so again it's still more or less behaving in line with how the class can be for plot reasons.
I have some MMO examples to go over as well which I'll do in a separate comment.
Can you give some examples where that happens, and what you mean by getting punished? Honestly, I can't recall any cRPGs that I've played where fighter/cleric/rogue/wizard (or equivalent, depending on the game) was not perfectly viable for completing the game - heck, Fighty McFighterson is often the first companion you run into in most cRPGs, with Stabby McSneaky and Whitebeard the Wizard coming 2 minutes later.
That said, though, I do admit that combo may not (is probably not) optimal, but there's two things going into that. The first is that, even if it can be achieved, perfect balance is not a state to strive for. Yes, it is perfectly balanced if the fighter's heroic blow", the paladin's "holy strike" and the barbarian's "mighty slam", all do the exact same thing but it's also boring and redundant. If two classes are functionally equivalent in what they can do, then they are the same class and one should be removed. But, that's really a state we don't need to worry about because there is always going to be some imbalance in any reasonably complex system - and that's why fighter/cleric/rogue/wizard is probably not optimal. Take something like Owlcat's Wrath of the Righteous - you've got 26 base classes (each with a half dozen subclasses) and 13 prestige classes without even getting into the epic level paths or mixing and matching with multiclassing. Optimal likely doesn't even exist in that case because changing the class of one party member will add and remove capabilities making the other classes more and less effective.
MMOs are an entirely different monster, but the good news there is you probably only need to wait a month or two for the next balance pass and the "meta" will change again. That said, though, that is a huge problem with modern gaming which has nothing to do with the developers or even the games. Take any game, give it a week, and some turbonerd on the internet will have done the math to figure out that Class X does 2.3 more damage per second than Class Y, in optimal conditions, and will make a video on it. Then, people will start sharing the video all over the internet. And 2 days later, many people will say "LOL! You're such a noob! Why are you Class Y when Class X is objectively superior? Get out of here, we don't want you and your vastly subpar DPS in our group!" even though Class Y is still more than capable of clearing all the content without difficulty. If anyone figures out a way to actually solve that problem, I will happily support their efforts to become the Supreme Ruler of Mankind in any way I can.
I'm a couple of days late checking this thread but will give some thoughts on the topic in general as well as address some of the specific examples brought up.
BG2 didn't function like a traditional D&D game/party. Not only if the protagonist literally powered by the Divine but almost every single companion has some unique twist that makes them stand out from their actual class and subclass.
Minsc is more than just a Ranger, if he even is one because he functions more like a Fighter. His internal party interactions can lead him to adopt Aerie as his new witch after the death of Dynaheir between BG 1 and 2 which will lead to moments where Minsc can enter a berserker rage, despite not being an actual Berserker, if Aerie gets hurt too much. There is also Boo, who turns out to be exactly what it says on the tin. A miniature giant space hamster, and not just a regular hamster some brain adled strongman has been convinced otherwise. Most Rangers don't get played like this, Minsc functions better as a two handed tank/dps than the animal attuned archer/"ranger" stereotype or dual wielding swords type and apart from the protagonist, Keldorn, Sarevok, and a couple of others, Minsc potentially one of the single best melee characters you can get. As a Ranger.
Speaking of Sarevok, he's quite possibly the best melee character in the game again because of unique traits which also require several significant decisions to be made in order to make use of them.
First, you need to resurrect him in Throne of Bhaal and recruit him. Second, you need to give him his sword back, a sword you originally get all the way back in the very first dungeon in BG2, but only if you do the side quest for the Djinn and return its lamp from Irenicus' chambers. Then you have to hold on to the sword for the entirety of BG2, although others can use it in the meantime, because it's not until ToB where giving it back to Sarevok will let him return some of its lost power and upgrade it from a +2 2h sword to a +4 that only Sarevok can then wield. By this point in the trilogy you should be able to take epic levels which means whirlwind and greater whirlwind in the case of Sarevok, and Minsc. Add on to that Sarevok's Deathwalker ability where he can literally one shot almost anything and you can see why he's the best melee character in the game outside of the protagonist who only beats him due to both plot and broken class choices.
And those broken class choices are a multiclassed Kensai/Mage that gain martial abilities from the Fighter subclass in addition to armour bonuses that don't need actual plate, the aforementioned WW and GWW epic feats, and access to various Mage spells to further increase your abilities as well as simply cause damage should you so wish. Or even Wish. Simulacrum, Contingency, and others like Haste, Mage Armour, let you further buff yourself to absurd levels because the game design accidentally permits it, but then you're meant to be a demigod according to plot so acting like one this way isn't really that out of character.
It's the same error Dragon Age Origins made with the Mage subclass Spirit Warrior that permits Mages to use their INT stat to work for both melee weapons and wearing armour when it would otherwise require STR. You can then again couple martial and magical abilities for a synergy that outperforms everything else in the game.
Similar to being powered by the Divine in Baldur's Gate, Mages in Dragon Age really are that terrifyingly powerful so again it's still more or less behaving in line with how the class can be for plot reasons.
I have some MMO examples to go over as well which I'll do in a separate comment.