What would have happened if Harry died during the Battle of Hogwarts? What would have happened to Grimmauld Place and his vault of money and his possessions? Who or what would these items go to?
Who inherits it would depend on who won.
If Harry died in the battle, who inherits his wealth would depend on which side won the war, since they’d have different ways of handling Harry’s wealth and possessions.
If Voldemort lost, it’d likely be the Dursleys’.
If Harry died in the battle and the Dark Lord was still killed, since his Horcruxes were destroyed and Harry wasn’t the only one who could kill him, presumably Harry’s wealth would go to the Dursleys. Harry almost certainly didn’t have a will, and in the only other case seen of who inherits a childless wizard’s possessions after their death, if Sirius didn’t have a will, his wealth would have gone to his oldest living relative, his cousin Bellatrix.
“Sirius was the very last of the line as his younger brother, Regulus, predeceased him and both were childless. While his will makes it perfectly plain that he wants you to have the house, it is nevertheless possible that some spell or enchantment has been set upon the place to ensure that it cannot be owned by anyone other than a pure-blood.’
A vivid image of the shrieking, spitting portrait of Sirius’s mother that hung in the hall of number twelve, Grimmauld Place flashed into Harry’s mind. ‘I bet there has,’ he said.
‘Quite,’ said Dumbledore. ‘And if such an enchantment exists, then the ownership of the house is most likely to pass to the eldest of Sirius’s living relatives, which would mean his cousin, Bellatrix Lestrange.”
- Harry Potter and the Half-Blood Prince, Chapter 3 (Will and Won’t)
It’s likely Harry’s possessions would have been inherited similarly, unless there was a rule against Muggles inheriting wizard money. There shouldn’t be one, though, since Muggles who inherit it could change it into Muggle money.
“What’s that you’ve got there? Oh, you’re changing Muggle money. Molly, look!’ He pointed excitedly at the ten-pound notes in Mr Granger’s hand.
‘Meet you back here,’ Ron said to Hermione, as the Weasleys and Harry were led off to their underground vaults by another Gringotts goblin.”
- Harry Potter and the Chamber of Secrets, Chapter 4 (At Flourish and Blotts)
Without a will, Harry’s wealth would presumably belong to the Dursleys since they were his only living relatives.
If Voldemort won, it’d likely be his Ministry’s.
Less clear is what would happen if the Dark Lord won. Presumably the Dark Lord would want to have all of Harry’s wealth seized by the Ministry. Though usually the Gringotts goblins mightn’t be willing to turn over the portion of it they controlled, Gringotts was no longer under their complete control.
“Similar reasons,’ said the higher-voiced goblin. ‘Gringotts is no longer under the sole control of my race. I recognise no wizarding master.”
- Harry Potter and the Deathly Hallows, Chapter 15 (The Goblin’s Revenge)
Griphook confirmed the Dark Lord took over Gringotts as well, so he likely could force them to turn it over.
“But it is, it is about precisely that! As the Dark Lord becomes ever more powerful, your race is set still more firmly above mine! Gringotts falls under wizarding rule, house-elves are slaughtered, and who amongst the wand-carriers protests?”
- Harry Potter and the Deathly Hallows, Chapter 24 (The Wandmaker)
Therefore, it seems likely that in the case that the Dark Lord won, Harry’s possessions would be seized by the Ministry.
Since the ministry controls Gringotts and Harry Potter's death would have seen Voldemort elevated to the status of a living God it's not implausible that his vaults would be seized by the ministry and his properties taken over.
DOLORES UMBRIDGE: Have you swallowed something funny in there? Become a Mudblood without any of us noticing? Harry Potter died over twenty years ago as part of that failed coup on the school — he was one of those Dumbledore terrorists we bravely overthrew at the Battle of Hogwarts. Now come along — I don’t know what game you’re playing but you’re upsetting the dementors and entirely ruining Voldemort Day.
Theere was a unpersonification campaign against Harry Potter in the Voldemort and Valor world and making him look like an terrorist so it's unlikely that any Potter artifacts survived the Ministry's iron hand, let alone find it's way to anyone that could be considered friendly or a relative to Harry.