If we wipe out all life on Earth, what happens to re-birth?
Rebirth will continue in other realms. In fact even right now everything you experience is just your wandering mind, so it will just keep wandering in constantly changing mind states as it is doing right now.
Also, it is possible that somewhere in the ocean of the vast cosmos even right now there is a planet with “human-like” life, that we have not or cannot discover due to the [cosmological horizon] (Cosmological horizon - Wikipedia). But what could be a barrier for space-time travel or scientific discovery, could not be a barrier for rebirth process.
Same principle would apply for animals.
And if re-birth continues in other realms, does that mean some will be trapped forever in Saṃsāra? My understanding was that one had to re-born as a human to have the possibility of liberation.
I remember Ajahn @Brahmali on many occasions saying that dhamma is taught not only in human realm. Also Buddha was teacher of both humans and gods, so devas and brahmas can hear and practice the dhamma as well.
MN95: With Canki
‘That Blessed One is perfected, a fully awakened Buddha, accomplished in knowledge and conduct, holy, knower of the world, supreme guide for those who wish to train, teacher of gods and humans,
Anyway, as long as you have dhamma now in your mind, you can continue practice in your next rebirth as long as your intellectual/spiritual capacity of your body allows that. Thats why gift of dhamma is so wonderful.
Thats also why reborn Anagamis are brahmas who know the dhamma and finish the journey in brahma-loka and realise full Nibbana from there.
Also, eventually sometime somewhere in the cosmos will emerge human-like life again, so the opportunity to practice as human being will arise somewhere in the ocean of time and space.
Relevant sutta:
SN56.47: Yoke with a Hole
“Bhikkhus, suppose a man would throw a yoke with a single hole into the great ocean, and there was a blind turtle which would come to the surface once every hundred years. What do you think, bhikkhus, would that blind turtle, coming to the surface once every hundred years, insert its neck into that yoke with a single hole?”
“If it would ever do so, venerable sir, it would be only after a very long time.”
“Sooner, I say, would that blind turtle, coming to the surface once every hundred years, insert its neck into that yoke with a single hole than the fool who has gone once to the nether world would regain the human state. For what reason? Because here, bhikkhus, there is no conduct guided by the Dhamma, no righteous conduct, no wholesome activity, no meritorious activity. Here there prevails mutual devouring, the devouring of the weak. For what reason? Because, bhikkhus, they have not seen the Four Noble Truths. What four? The noble truth of suffering … the noble truth of the way leading to the cessation of suffering.
“Therefore, bhikkhus, an exertion should be made to understand: ‘This is suffering.’… An exertion should be made to understand: ‘This is the way leading to the cessation of suffering.’”