Is earth the ideal condition to achieve Nirvana; advanced enough for a being to discover and teach the universal truth of reality but not so advanced that beings won't care enough to strive for it?
According to the Buddhist cosmology, a human being has the best advantages to become enlighten.
It is not intrinsically marked by extremes of happiness or suffering, but all the states of consciousness in the universe, from hellish suffering to divine joy to serene tranquility can be experienced within the human world.
For being in the lower realms:
Among the lower realms, Pretas (aka hungry ghosts), and dwellers in the Narakas (Buddhist hell(s)) are gripped by pain and fear, and can only endure their lot but cannot better themselves. Animals are intellectually unable to understand the Dharma in full.
For being in the upper realms:
Most of the Brahmas and Devas simply enjoy reaping the fruits of their past actions and think that they are immortal and forever to be happy and so they don't try to practice the Dharma.
However in addition, when the Dhamma teaching is no longer available in the human world, some of the upper realms may still abundant with being knows Dhamma and still possibly attend nirvana.