I've been playing PF the past few years, after a year or so of 4e, and I can say that I'm happy with the direction I've seen so far from 5e in terms of optimization options.
One interesting thing I noticed, especially in PF, is that PC optimization is really just an arms race against their other players. The DM can alway throw bigger bads at the party. But if the gulf in power between PCs gets to big, and the DM still wants to challenge the party as a whole with combat, then players that aren't as invested in system mastery, or want to pursue a particular vision for their character instead of the most mechanically superior options for their class, just end up being over shadowed during combat.
Some GMs are probably okay with this, or have to alter or create encounters that challenge players at an individual level. I found myself feeling like a board game designer, and that's not really what I wanted out of my TTRPGs, so I stopped playing Pathfinder.
Of course I could have worked even harder as a GM and taken those optimizers aside and try to talk them down a notch, but what I found is that the system itself encouraged optimization, starting with the point buy system. And besides, that optimizer is a long time friend, and he grew up on 3.5 so, I wasn't going to tell him that I thought he was doing it wrong. He was doing what he thought the system encouraged and there's no right or wrong about it. I realized I was fighting an uphill battle with a system that didn't encourage the type of game I wanted to GM.
We started playing 5e though, and I think he's having fun. In PF he's contribution to role playing social encounters was pretty limited and uninspiring, but last session he was super entertaining and really in character, using his background, flaws and traits. It was a surprising turn, and the other players and I even spoke about it afterwards. The system really does encourage roleplaying in a style that I remember from older editions before the rules sort of took front and center. Though without a doubt when I was 13, I'm pretty sure we didn't really understand the rules for 1e and 2e, and we were most certainly "doing it wrong" but we had fun, and I don't remember a single stat/option build, but I do remember a lot of stories. That's what I'm excited about doing again with DnD.