For the sake of sanity, add a minimum threshold
Things get way too awkward even before zero - at 1 inch (~2.5 cm) and 150 pounds (~68 Kg), the character is now made of something with a stupidly high density. Note that the mass doesn't change with wild magic, so it doesn't vanish - it still has mass. As something can't occupy a zero volume and still have mass, either we completely kill physics to its core (okay we've been doing it already, but this is where I draw the line) or we don't allow it.
If someday this actually happens, I would simply say that, under X inches (possibly around ~15), the wild surge simply doesn't affect the creature any more.
This is not RAW, and it does not need to be. This is a situation that is probably never going to actually happen in a table, so it was probably not thought in advance when making the rules.
Many unexpected events can occur in a D&D campaign, and no set of rules could reasonably account for every contingency (from XGtE).
“A wizard did it”
You’ve probably heard the phrase before to explain with a hand-wave why something weird exists, like bulettes or owlbeards: “a wizard did it.” There are things in D&D that were made by human Dungeon Masters for convenience of creating fun adventures, not via rules for players.
Like owlbears were (allegedly) created by a mad wizard, so is a lot of Undermountain.
Halaster’s apprentices are mad and powerful inventors
Halaster’s apprentices are older than Waterdeep. The city was built on the ruins of their original wizards’ tower. Today, those who still live, are ridiculously powerful archmages. Halaster himself, if he still lives (the jury is still out), is nearly a god-like force of nature in his own home.
The entire existence of Undermountain was originally to give Halaster and his apprentices a place to learn secrets of magic and develop new spells and things in private. The place is packed with bizarre, unique creations that have not been shared with wizards outside its halls.
His apprentices guard the secrets of their discoveries and creations jealously (first and foremost from each other — only secondarily do they care about the world above), and nobody knows how they do what they do.
In a less lore-focused way, Halaster and his apprentices were created to be plot devices, which could be used to explain anything non-standard that exists in Undermountain.
Every spell was invented by some wizard once
Earlier editions of D&D had spell research rules, and those are part of the lore of even 5th edition. For example, Tenser’s Disc was invented by Tenser (a PC played by Gary Gygax’s son Ernest in Gary's campaign). The spell wasn’t available until Tenser researched it and shared it with other wizards, so that knowledge of the spell spread throughout Greyhawk and, before long, across the Multiverse.
Halaster and his apprentices have invented many spells, rituals, and partly-magical inventions. You will find many unique magics under Waterdeep, but won’t necessarily learn the secrets behind them easily, if ever. Those secrets are buried deep, and they don’t like to share.
There is probably a ritual to create more of these living unseen servants, but it’s likely hidden away in the carefully guarded spellbook in the carefully guarded secret lair of a mad and dangerous archmage somewhere deep in the lower levels of Undermountain.
To read more
The original lore on Halaster and his apprentices is first established in their first published appearance, the AD&D 2nd edition megadungeon boxed set The Ruins of Undermountain. The price of the PDF is well worth it just for the lore, but it’s an excellent playground for PCs of all levels as well. (Converting it to 5e is likely a pain though, and I haven’t tried yet so can’t recommend either way.)
Best Answer
Assumption: The question is actually "How can I determine the height of a room where the height is not explicitly stated and the room is an irregular shape?"
Unfortunately, ask the DM
Often, a room's height doesn't matter. Many DM's (myself included) forget about ceilings until it actually comes up in play.
But if you're a connoisseur of ceilings, a renaissance-man of roofs, or a tourist of tops, you'll likely keep an eye out for such details, in case it comes in handy.
Matt Vincent has an excellent answer about "normally" shaped rooms, but in any case where "length" and "width" aren't easily measurable ('s' shaped rooms, '@' shaped rooms, 'etc' shaped rooms, etc.), you're just going to have to ask the DM.
Over time (Maybe before the end of the module), your DM will start learning to include that information, and you won't have to ask.
It may be worth noting that If you're trying to play a highly tactical game where the height of a room is critically important to your play style, you and your DM (or the other players) might not be all on the same page. A mini-session-zero revisit to address this could help out.