It's fine unless you're level 18
To see how Purple Dragon Knight (PDK) stacks up let's compare it to a fighter archetype from the PHB. Since we're worried about PDK being underpowered we only need to find one already accepted archtype that it is comparable to. We're going to use Champion because it is broadly similar and it's abilities make an for easy evaluation. Also we're only going to look at direct ability vs ability since the, "feel", of an archtype in play is too subjective.
Level 3
- Champion: Improved Critical for some occasional (1/20) bonus damage.
- PDK: A (fighter level) group heal once/short rest as a bonus action.
It's a judgement call but I'd say they are about equivalent at this level. Improved critical may or may not come up much based purely on luck but some extra group healing is always handy.
Level 7
- Champion: Half proficiency with some skills they may already have. Longer jumps.
- PDK: Extra skill proficiency. Double proficiency with persuasion.
About equivalent. Both archetypes just pick up some skills.
Level 10
- Champion: Another fighting style
- PDK: When you action surge one of your allies makes an extra attack. Goes up to two attacks from allies at level 18.
Since the fighting styles don't offer much synergy the extra fighting style is likely to give a bonus to the fighter's backup weapon or just +1 AC. A once per short rest extra attack for your allies is likely to do more damage in an average day; near certain to after level 18.
Level 15
- Champion: Improved Critical 2, the Critening.
- PDK: Bonus saves for allies a couple times per long rest.
Champion might be better at this level but it's a judgement call. If you value straight damage another 1/20 chance of critical hits is something. If you value survival clutch extra saves for your team is great. I'd call it a toss up.
Level 18
- Champion: Quick healing
- PDK: Your level 10 ability now works on two allies
This is the tipping point where Champion is clearly better than PDK. PDK's big finisher is just... a slight improvement of an earlier ability. That's pretty sad.
Conclusion
Below level 18 PDK is happily balanced versus Champion. At and after 18 PDK is just too badly hampered by its lack of an archtype-capstone ability. Luckily for PDK most campaigns are played well below 18 making this less likely to be a problem.
Note about the level of Inspiring Surge
While the book says the Inspiring Surge upgrades at level 17 that is apparently in error. This tweet from Jeremy Crawford says that it should be 18th level.
There are three (and a half) versions
The classic Ranger as given in the PHB.
The Ranger with No Spells as given in the Unearthed Arcana: Modifying Classes.
- This version removes the spellcasting progression from the class and gives them a more nature-based theme. This version has included in it Superiority Dice (from the Fighter's Battle Master archetype) and various abilities that mimic spells, but are explicitly nonmagical.
The Revised Ranger, which is also in the Unearthed Arcana.
- This version of the class is what a lot of people enjoy. It upgrades the strength of many of the classic Ranger's abilities. Its Favored Enemy and Natural Explorer abilities are so good, it becomes worth it to consider a 1-level dip in this class just for those abilities.
In the 2019 Class Feature Variants UA the Ranger (in pdf) was given several alternate, or appending features.
- The core class is still the one in the PHB, but was given optional features to replace certain features (Natural Explorer, Favored Enemy, etc.), append to options (including a Fighting Style which grants druid cantrips), or add to the spellcasting feature (including adding spells to the class list, spellcasting focus, and the ability to replace spells on long rests).
These three (and half) versions of the Ranger are, in essence, different classes which all just happen to share a name. There are, of course, many archetypes/conclaves, but those minor differences do not constitute a totally different release/version of the Ranger.
Best Answer
The main issues with the Ranger are due to the weakness of the first two class features, Favored Enemy and Natural Explorer. Here's the rules text (from page 91 of the Player's Handbook and the Basic Rules):
The first issue with those two features is that neither one does anything in combat. That's a little bit problematic when combat is one of the three pillars of adventure, and probably the most universal one. Some campaigns will not have too much social stuff, others skip over most details of exploration. But hardly any D&D game will skip combat. Every other class gets features at first level that function at some level for combat. Sure, it might be possible for a Ranger's abilities to give their party an in-combat advantage by setting them up to ambush their foes or something, but that relies upon a lot of player cleverness or DM assistance, and doesn't flow automatically from the abilities themselves.
The second issue is that the utility of Favored Enemy and Natural Explorer outside of combat is highly polarized. When they're not useful (perhaps because they're not in their favored terrain nor confronted by their favored enemy), they do nothing at all. This is very common if the Ranger's player and the DM haven't coordinated at the start of the campaign. But even when they are useful there can be problems. If they are useful at all, they're very useful. Maybe too useful, to the extent that they remove all of the challenge of one part of the game.
Because of this, a group facing those challenges who has an appropriately specialized Ranger may just end up skipping over them, especially after the first few times the Ranger helps them breeze through the challenge. "Oh, the Ranger can effortlessly guide us through the 'deadly' forest because that's his favored terrain, so lets not waste our time counting rations and making survival checks and just jump ahead to when we reach the dungeon in a couple days." Or the DM might think: "Hmm, what monsters should have kidnapped the blacksmith's daughter? Orcs are the Ranger's favored enemy, which would make tracking them trivially easy, so I'll go with goblins." A Ranger may thus never get a chance to shine at their specialty because they're just too good at it.
There are some further issues with the Ranger subclasses in the PHB, that are mostly improved upon in other more recent subclasses. One major problem is that the Beastmaster's animal companion is too squishy to survive long in combat against tougher monsters and losing it, even temporarily, them makes the subclass weaker and breaks its theme (it's hard to be a Beastmaster when you don't have a beast to be master of).
Unsurprisingly, these are among the features that the Class Feature Variants document from Unearthed Arcana offers alternatives to. It offers replacements for both of the PHB Ranger's starting features, and also some buffs for the Beastmaster. There are also more options to improve Ranger spellcasting, including giving more options for spell selection, and offering an alternative third level class feature that lets a ranger know and cast certain utility spells without using spell slots or their limited spell selections.