On the Day of Judgement everything in the heavens and earth will be destroyed, but what if humans would have inhabited other planets or even other galaxies by then, will they be destroyed?
On the day of judgment, earth will not be the only thing to be destroyed, everything that exists, everything in the universe, every galaxy, everything that was created, will seize to exist (except Allah). So inhabiting other planets will not save any living being from the day of judgment
Islam teaches us how the existence will end. We know when the angel Israfil will blow the soor, the qiyamah will begin. Allah says in quran that the heavens and earth were one point adjoined, then he cleft them asunder. (separating them.)
Allah says in the quran "as we originated creation, so too shall we return it. This, a promise binding on us"
When the soor is blown the universe/multiverse will collapse on itself and return to that single intense point. This will destroy everything, from there Allah will remake the universe/multiverse however he sees fit.