>>57528013He had all of his king's possessions hidden away. He recollected everything after finding his reason to live. Unfortunately, he couldn't buy his castle back because it was essentially a historical site, but he managed to purchase a building in Luminose, which he converted into a hotel so he could both live in it and profit from it.
Source? My ass, but I think it kinda makes sense since he was a hobo for 3,000 years and he had to have some wealth hidden away since it's impossible for a man like him to acquire a building with no money.