Obviously.It's worth pointing out that there are plenty of evil creatures that have the ability to shapeshift into human forms--just not dragons.
What I meant by "free" shapeshifting was the ability to take on pretty much any form you like, and to take on different forms each time.
Most such creatures are limited in certain and often hoghly specific ways. Succubi etc are exceptional, since their very reason for existance hinges on their shapeshifting ability. And doppelgangers are the very definition of shapeshifting.
My observation is that when a monstrous creature can assume a humanoid form "just as a bonus" rather than as their defining feature, that creature is almost always a do-goody creature.
Not that the D&D rules have prevented evil creatures from shapshifting, but that has more to do with the fantastical and generous spellcasting abilities offered by the game.
But with 5th Edition, this has changed. Massively.
While I read through the various d20 supplements I was struck by how spell level requirements were not always followed - there was creatures that could polymorph with as few as three Sorcerer levels. That is, they cast the spell "as a 3rd level Sorcerer". Despite how that isn't even possible in general.
Contrast this with 5th Edition:
* most (if not all) spells that offer shapeshifting abilities have the Concentration requirement. This means that EACH AND EVERY TIME the creature takes damage (even as little as a single point of damage) there is a non-negligible risk that the spell fails, and the creature's true form is revealed.
This restriction alone means the spellcasting route is all but closed for the "undercover monster" trope.
* the minimum spell level to shapeshift into a humanoid is no longer 4th level (or even 2nd, as in the way this was implemented for copper dragon wyrmlings). At the time of this writing you need a level 9 spell, though it is reasonable to suspect this is more of an artefact due to the limited number of splatbooks released than any intentional restriction.
Judging by draconic spellcasters as an example, this would currently restrict spellcasting shapeshifters to CR 27. And not even then would it be practical, because of the concentration requirement. (I guess you could technically supply the monster with several "Potions of Shapeshifting" to waive the concentration requirement; but then you'd run afoul of the short 1 hour duration... and handing out crates of Legendary potions that the players could then loot simply isn't a realistic solution)