Interesting question. The sun never goes dark, not for trillions of years. But it does have an interesting future
There I’m summarizing the Wikipedia on this in the Sun life phases - but in my experience it is very accurate on things like this as a result of checking many of their articles - astronomers seem to be very active in keeping it accurate - so though I haven’t checked those figures, for something that has had as many astronomers eyeballing it as this, I’d have thought it would be correct. (There are other topics where in my experience wikipedia is very unreliable).
This diagram summarizes the future evolution of our Sun based on the Hertzsprung–Russell diagram - a rather simple idea - you chart stars according to their luminosity, and their temperature. You can read the temperature easily from their colour spectrum. So those are things you can measure very easily with simple measurements, for any star, so you can just observe a star and pop it on the HR diagram. It turns out that all stars start off on the “Main sequence at the bottom of this diagram and stay close to it for billions of years, so typical diagrams like this, say for a galaxy, or a star cluster, have lots of stars near the main sequence line, and this is how astronomers began to figure out the basics of stellar evolution.
File:Evolution of a Sun-like star.svg - Wikipedia
This shows the position of many well known stars on the HR diagram.
File:Hertzsprung-Russel StarData.png
So - it’s very unlikely that anything could remain habitable all the way through to the white dwarf phase especially during those thermal pulses and the end when it throws off half its mass in a planetary nebula. But life could survive maybe by jumping from one place to another - and if there are technological beings here by then, who knows what they could do with billions of years old megatechnology.
But - surprisingly, there are planets sometimes found orbiting white dwarf stars. This is the first to be discovered. Astronomers find the first planet known to orbit a white dwarf
The big question is whether they were there all along and somehow got brought inwards at some point or they formed from scratch.
Either way - might they have life? Well - they seem unlikely candidates, but they are worth searching because - they would be amongst the easiest for us to observe. It’s like that story of looking for your keys beneath a street light if you lost them in the street. We can look there more easily than many other places, and just possibly might find life, or conditions where life could evolve again from scratch. See Does Life Exist on Planets Orbiting White Dwarfs?
So anyway back to Europa. I don’t think there’s any chance of life surviving there right the way through. It’s mainly ice and - it turns out that after the Helium flash - Europa is too close to the Sun to be in its habitable zone. But it would be possible for life to flourish there right through to the sub giant and red giant phase when the habitable zone ranges from 2-9 AU. Jupiter is 5.2 au from the sun. At that point it would no longer need tidal heating, and the surface ice would melt. Figure for habitable zone here See Can Life develop in the expanded habitable zones around Red Giant Stars?
Now - could it retain its water at that point? Well if exposed to a vacuum it would lose it quickly. I did a calculation here for Ganymede, which is a bit larger than Europa. Robert Walker's answer to Do water planets exist? - I worked out that it would vanish completely in only 67 years if directly exposed to vacuum without any atmosphere.
However it would quickly form a water vapour atmosphere. I figured out that it could last for several million years in that case. All that assumed fresh water, would be slightly different for salty water but I didn’t try to estimate that. Then finally it could develop a layer of scum on the top, especially if it had photosynthetic life. If so that could reduce the rate of water loss, depending on the nature of the scum. But if it stops the water evaporating (rather than encouraging it) then maybe it could survive for tens of millions of years or more.
So - maybe in natural course of events Ganymede becomes habitable. Europa being smaller and warmer loses its water a bit more quickly but some gets to Ganymede. Maybe if somehow it develops a surface layer of scummy organics that’s very good at retaining the water it can last all the way through the billion years of the red giant phase. For instance, suppose it has photosynthetic life - but there’s not much protection from UV, so the life is killed on the surface but survives just below the surface - the dead life maybe is very good at protecting the water from evaporation.
Once it goes through the helium flash though, Europa is toast, it would just boil away as it would be inside of the habitable zone, and same also for all of Jupiter’s icy moons. The habitable zone now extends from 7 to 22 au. So now it’s the turn of Saturn (9.6 au) and Uranus (19.2 au), from Can Life develop in the expanded habitable zones around Red Giant Stars?,
Saturn has Enceladus which may well have life. It also has Titan which has methane and ethane oceans which may have exotic forms of life, but they won’t be able to survive once it gets that warm, they depend on very cold conditions. If they can migrate (if they exist) they would now be looking for niches in the very distant parts of the outer solar system way beyond Neptune and Pluto to survive). However it probably also has a subsurface ocean may have life there too.
I can’t imagine Enceladus lasting long as it is so small unless it has very evaporation preventing scum. But Titan could last a long time as an ocean world with scum + water vapour atmosphere.
Then we have the thermal pulses and the planetary nebulae. That’s only 500,000 years. Short enough so that even if the life survives in dormant form it could revive after that time. So - need some way for the life from Saturn and Uranus to find its way into the newly forming planets around the white dwarf - or else those are planets that migrate inwards in which case - maybe there’s lots of inward motion of matter to bombard them with life giving asteroids or comets from impacts into Titan?
So you could imagine life managing all the way through to the white dwarf phase I think. But in a series of stepping stones. Not in one location all the way through.
BTW in the near future starting perhaps half a billion years into the future (may seem close but that’s long enough for humans to evolve all the way from the smallest microscopic creatures a second time) - as the sun warms up, Mars, and then maybe Ceres and Vesta and perhaps other large asteroids also could be useful oases for life when Earth is no longer habitable, and before Europa, Ganymede and Callisto get their turn.
All of this is not taking account at all of technological intelligent creatures which could do many things to ensure habitability. E.g. if they can move Europa - well within the capability of megatechnology - and cover its surface with ionic fluids, or even, give it an artificial atmosphere and put an artificial covering over that atmosphere to hold it in - or whatever - they could keep it habitable all the way through perhaps. Or do many things. Perhaps by then they live in the Oort cloud using fusion reactions for mini suns and are so far from our Sun that what it does hardly bothers them and they just enjoy watching the planetary nebula from a safe distance. There’s no way to predict once you have megatechnology + intelligence, just depends what they decide to do in that distance future, which would depend on their motivations which we can’t hope to predict really.
If you spot any mistakes in this, however small or major, please don’t hesitate to say, for instance in the comments below.