The trick here is, what does "balance" actually mean?
To me, balance means that no given option is so obviously better than any other options that it makes no sense to choose those other options. I use Two Weapon Fighting in 2e as the best example - you doubled your damage output at the cost of 1 point of AC (the best a shield could give). There was absolutely no reason not to do this. Very, very imbalanced.
But between ranged and melee? Meh. This is not an issue I'm seeing. For one, you're giving up other options as well - no defensive style, for example, meaning that you cannot protect your allies. Plus, the ranged guy needs something in front of him or her. The argument that they are "just as good in melee" isn't really true. You're limited to finesse weapons (d8 rapier at best) and have no feats or abilities which add to your melee capablilities. Plus, if you actually play standard array PC's, you're limited to a 16 Dex, 15 STR (presuming human) at 1st level. You're going to be spending two feats to get that Dex to 20, 2 MORE feats to get those ranged feats - we're looking at very high level characters here.
But, I suspect that a lot of the problems are a combination of either die rolled/point buy characters and DM's who do not pay a lot of attention to tactics at the table. AP's are so easy anyone can succeed? Yup, that's true. If the DM constantly soft pedals encounters and doesn't bother to actually spend any time on tactics. Fair enough.
Difficulty in 5e isn't found in the mechanics. It's found in what you do with them.