This sounds like "Understanding Space and Time" by Alastair Reynolds (2005).
A plague wipes out all people on Earth and the last surviving person is John Renfrew, who is in a base on Mars. After he dies in a rover accident, he wakes up back in the Mars base and finds he has been resurrected by crystalline aliens who end up helping him in his quest to understand physics completely by "upgrading" him.
(Also features a holographic Elton John...)
In space he grew prolifically for fifteen million years. Hot blue
stars formed, lived and died while he gnawed away at the edges of
certain intractables. Human civilisations buzzed around him like
flies. Among them, he knew, were individuals who were engaged in
something like the same quest for understanding. He wished them well,
but he had a head start none of them had a hope of ever overtaking.
Over the years his density had increased, until he was now composed
mostly of solid nuclear matter. Then he had evolved to substrates of
pure quark matter. By then, his own gravity had become immense, and
the Kind reinfoced him with the mighty spars of exotic matter,
pilfered from the disused wormhole transit system of some
long-vanished culture. A binary pulsar was harnessed to power him;
titanic clockwork enslaved for the purposes of pure mentation.
The story can be found in Reynolds' collection "Zima Blue".