After Sun swells, "becomes fat" and absorbs everything within Earth orbit, there will be still opportunities for survival.
Even those stars that already reached their final stage of development, exploded using all their nuclear fuel resourced, and experienced following after explosion collapse (compression) can still keep planet systems. New data shows that asteroids, dust disks and even remains of planets can spin for a long time around so-called white dwarf - which is in fact dead star. It was considered earlier that gravitation and radiation influences of dying star will not leave any chances to surrounding planets.
All this give hope that after milliards of years there will be still opportunity for Earth to exist. But if there are any remains of life by that time it is senseless to hope for comfortable conditions.