It was indeed Poul Anderson. The story is In Memoriam. Apart from its original publication in Omni in 1992 it has been anthologised only once in All One Universe, which is where I read it.
The last man on Earth knew not that he was. Nor would he have cared. He had met very few other humans in his life, and none since his woman coughed herself into silence. How long ago that happened, he did not know either. He kept no count of years, nor of anything else. She lay blurred in his memory, but so did most that was more than a few days past. Day-by-day survival took all his wits and strength, such as they were.
Then as you say a race of intelligent octopuses evolves:
A variety of Octopodidae got to outliving their own procreation, and thence to caring for their young and a lifespan that lengthened as generation followed generation. Ultimately there were beings whose tentacles worked rock, shell, bone, and coral. They had language, although its symbols were gestures and color changes. They hatched ignorant and weak, but learned from their elders and from experience as they matured.
That was the approximate time when the sun left the main sequence and swelled to gigantic size. Surface temperature declined until it shone red, like a dying coal, but the whole output was monstrous. At its greatest radius, it ate Mercury and Venus and filled almost half the sky of Earth. The globe glowed, sand fused into glass, the last faint fossils melted and the last biotic molecules broke into their olden elements.
Now the sun collapsed. It ended as a white dwarf, hellish hot, its mass crushed into a volume scarcely larger than Earth’s, gradually cooling toward oblivion. But this is epilogue and incidental. Nature had already erased from the Solar System every spoor of humanity. We might as well never have been.
Many light-years away, on widely divergent courses, Pioneer 10 and 11, Voyager 1 and 2, and perhaps some small sister spacecraft fared among the stars