The answer to this is in the description of the spell itself.
PHB. pg. 284 (continued from 283 True Polymorph spell description); emphasis added on the applicable point is mine
Object into Creature.
- You can turn an object into any kind of creature, as long as the
creature’s size is no larger than the object’s size and the creature’s challenge rating is 9 or lower.
This stands to reason that this limitation is applied both ways. Although the Creature to Object section doesn't explicitly cover it, since Object into Creature does cover the size limitation literally right before it, it stands to reason that changing a creature into an object limits the size of the object to the equivalent mass of a creature within the CR 9 rating limitation. So if you wanted to turn a chipmunk into a house, it wouldn't fly. In addition, this prevents the abuse of turning a mountain into a mouse, and then letting the spell wear off inside a town you don't like anymore.
1. That isn't how Change Shape works
...there is an Ancient Brass Dragon in the party that can kill basically anything it wants and shapeshift back into his Lvl 20 Bard self and play a jaunty tune while he's at it?
Change Shape for a Brass Dragon includes this caveat at the end of the description (MM p. 104):
Its statistics and capabilities are otherwise replaced by those of the new form except any class features or legendary actions of that form.
He doesn't turn back into his bard self, since he can't take on the Class features. There are reasons for this.
- His new self is the Brass Dragon, not the humanoid Bard. That's what the permanent feature of True Polymorph does ... you become something new.
- Player Characters and Classes don't have a CR, and CR guides what you can turn into. (Or level, if the target doesn't have a CR)
A related consideration is: what age group of a dragon do you turn into? Is it related to character age, or not? The discussion in that question about Dragon PC's may be of interest to you.
As for the Lich being turned into a turtle? Good idea, if you can manage it.
2. Balance and 9th Level Spells
By the time characters can use 9th level spells, balance becomes a function of DM style, choice, and rulings. Spells of that level are very, very powerful, in some cases making changes in reality of the game world. True Polymorph and Wish are particularly good examples of that. Characters at levels 17-20 are in the "Masters of the World" level of adventure as described in the DMG page 37. (Cue Crosby, Stills, and Nash singing We can change the world) Game balance at this point comes from DM challenging the players and DM rulings.
OK, so you're the DM, and ask "How do I balance this?" At that level, adjusting the level of challenge for your players is where you find the balance point. That's part of your role as DM. Bounded accuracy in 5e is one limit to player power. Increasing the challenge by increasing the numbers and kinds of opponents, or creating unorthodox alliances of NPC's and monsters is a way to keep the players challenged at high levels.
If the players are warping reality too far in one direction, the arrival of a pair of silver dragons(ancient), a few high level high celestials / angels, and a few NPC's to challenge them isn't out of line.
Another line to explore is that your new Ancient Brass Dragon PC has become the challenge to be overcome by a party of high level adventurer NPCs. That's what high level adventurers do, it seems: slay dragons.
A further limitation, and potential balancing method, on this use of True Polymorph is in the published errata (for the sixth printing of the PHB, and in the spell's text in the SRD, V 5.1): the "permanent" feature of true polymorph lasts until it is dispelled. If some opponent or nemesis of the PCs learns that the PC had been true polymorphed into dragon form, a casting of Dispel Magic (at 9th level, or with a successful DC 19 check if cast at a lower level) would return the bard-dragon into the bard's original form. That's a way to "balance" the magical effect if the bard-turned-ancient-dragon creates an unbalanced situation in a given campaign. (Thanks to @guildsbounty for the update)
The only limit to the challenge is the limits of your imagination. There is a load of help for the DM in the DMG. It covers a very broad range of tools to help the DM create a challenging game world.
Best Answer
Not much.
Let's go to the text!
True Polymorph (PHB p. 283):
The word "kind" seems to be pretty important here, so let's see if any other spells or other rules use it in this way:
Antipathy/Sympathy (PHB p. 214):
Locate Creature (PHB p. 256):
Special Purpose (sentient magic items) (DMG p. 216):
Wand of Orcus (DMG p. 227):
Examples we have of "kinds of creatures" are: red dragons, goblins, vampires, humans, unicorns, elves, druids, skeletons, zombies. So, that implies that that is the level of choice a spellcaster has when casting True Polymorph.
To address your examples, it seems like "elf" and "drow" are viable choices, but nothing more specific than that.
As far as physical sex goes, some kinds of creatures (marilith demons, androsphinxes and gynosphinxes, hags) are inherently constrained to specific forms, but in other cases, it's not specific to the kind of creature selected, so it's not something the caster chooses. As a DM I would generally either have the post-polymorph character be of no particular physical sex, or be of the physical sex most nearly equivalent to that of the character before the transformation.
Any other aspects of appearance are up to the DM. They might declare that polymorphed creatures bear some resemblance to their previous forms, or they might declare it to be completely random.
Also, consider this sentence from the related spell shapechange (PHB, p. 275):
So shapechange doesn't allow the caster to specify specifics of appearance, restricting them to an "average example" of the kind of creature they have chosen. It seems reasonable to infer the same kinds of limitation apply to the polymorph spells as well.