Midnight At The Well Of Souls by Jack L. Chalker

A disparate group of people suddenly finds themselves stranded on an enormous, artificial world whose surface is divided into hundreds of biologically distinct hexes, each populated by its own strange races and governed by harsh local laws; many wake in unfamiliar bodies and must learn new societies and survival rules. As they struggle to find one another and a way back, alliances form and betrayals unfold while political and technological forces within the planet vie for control of its mysterious central mechanism. The story blends fast-moving adventure, inventive worldbuilding and questions of identity and morality as the survivors race to uncover the purpose and origin of the machine before hostile powers seize it.

Purchase from Bookshop.org