A few high level arcane spellcasting monsters, such as the Lich from the Monster Manual, also have Legendary Resistances (here, 3 per day).
Such spellcasters can prepare then cast Shapechange on themselves to become a legendary creature (such as an Ancient Brass Dragon), while keeping some things:
You retain the benefit of any features from your class, race or other source and can use them, provided that your new form is physically capable of doing so.
It is clear from the Monster Manual's errata that there are several things not gained from assuming the form of another creature:
If a creature assumes the form of a legendary creature, such as through a spell, it doesn't gain that form's legendary actions, lair actions, or regional effects.
But there is no mention of Legendary Resistances here.
What happens when a spellcaster with Legendary Resistances casts Shapechange on itself to become another creature that also happens to have Legendary Resistances?
(For the example's purpose, let's say that the Lich has used 1 of its 3 resistances before Shapechanging into the Dragon.)
- The caster's legendary resistances (here, 2) get overridden by the resulting creature's legendary resistances (here, 3) but become available again when the spell ends
- Both sets of legendary resistances are available at the same time (for a total of 5)
- Some other scenario