Pretty crazy to be reminded that in a far off future, Earth could be a wasteland because that just how the universe works.
But I do think that there is one possibitiy of saving the planet and luckily billions of years for technological advances to allow us so. If we dont kill ourselves I'm the next 1000 years.
We will need to find a way to propel the earth when needed. Turn the planet into one big ship and push earth into the newest habital zone of whatever phase Sol is currently in.
And really in a short amount of cosmic time, we will need to push the earth farther out as the Sun increases in luminosity. In the time the earth has had life on it, we have about that exact same amount of time to get the earth moved or our home becomes a wasteland.
But I guess it might be easier to just keep moving outwards to Mars and then moons of Jupiter and Saturn.