True Polymorph: Getting the new form it easy - it's keeping this new form that's the trick.
True Polymorph transforms creatures quasi-permanently, at least until one runs afoul of Dispel Magic or any Anti-Magic eye or shell. As per the spell:
If you concentrate on this spell for the full duration (one hour), the transformation becomes permanent.
In this example we take any creature (say, a goblin) was transformed into any dragon egg (CR 0). RAW, this works and the egg is born and grows up as a 'normal' dragon. Of course, this dragon grows up in abject fear of any Dispel Magic spell, any Anti-Magic Shells... or even any Beholder's central eye. Ironically any metallic dragon would weirdly self-destruct when it matures enough, as it would gain their Shapechange ability. As any shape changer becomes immune to any shape change, this rule would end the True Polymorph spell, RAW. Ironically, the magic of being a dragon would immediately end this centuries-old ability to be a dragon.
Still, you can imagine (after a thousand years), such a creature does NOT want to go back to being what it once was. Remember, it was only a goblin for a bit over a decade. It really sees its time as a goblin as a weird... surreal dream... from (literally) another life. Molecule to molecule, the dispel magic should logically remove about 30 lbs of goblin flesh from the now fully developed dragon - but, as we know, magic is not logical.
How to deal with creatures that don't want to go 'home' to their original bodies? A few exciting options that may or may not work:
1/ Clone: If a dragon hires a powerful wizard / bard or gains enough CR to cast this spell itself, it could just take a part of its flesh and clone it. Now, RAW Lawyers® get a say here. Would that bit of flesh (now reduced to zero hit points) not just spring back to a bleeding hunk of goblin? Or would it stay as a dragon-flesh - as the host is still alive? Or would the magic simply Clone the alleged base-creature anyway, thereby developing a fresh young goblin body in a few months ('120 days')... awaiting the poly-dragon's arrival should it die?
2/ Reincarnate: This spell captures the very spirit of a creature and gives it a new body relative to its species. The list of random bodies in previous editions used to include woodland creatures (in v. 2E you could be reborn as Wolverine! But... an actual wolverine). Now RAW is very simple:
The reincarnated creature recalls its former life and experiences. It retains the capabilities it had in its original form, except it exchanges its original race for the new one and changes its racial traits accordingly.
Bloody heck, ORIGINAL race! The poor once-goblin would not get to roll on the glorious table of possible dragons! Instead RAW Lawyers® would have it go for the dreaded non-human / humanoid tables. It could end up as a Bugbear... or who knows what else? A teenage kobold? And humans think puberty was hard, just imagine. We won't even mention that RAW Lawyers® will demand this spell only work on demi-humans in the first place.
3/ Carved in Stone: Getting desperate, the dragon will go to a petrified state possibly by getting help from a Medusa. One brief staring contest later and the dragon is now a gargantuan statue. In this shape-material one would surmise the base polymorph enchant MUST have (finally) lost its grip. Exception breaks the rule and all that, right Jeremy Crawford? Or do the RAW Lawyers® now believe that you could cast Dispel Magic on this massive stone draconic statue and it would... transform... into a stone goblin from another transformation twice removed... from over an eon ago? Otherwise, Break Enchant spells should return the dragon to its REAL dragon shape, allowing the True Polymorph spell to fade away - as it logically should have (RAF / RAI) over a thousand years previous.
I can list another six to ten options for what this ancient draco-goblin can do to save itself. The question remains: *how does anyone remove the True Polymorph magicks from any creature without destroying the new form?* This is easy in Beauty & The Beast (spoiler: 'you just destroy the rose!') - but not so clear in 5e D&D.