Sadly, what is in the past cannot be undone. We can help poor and needed people, though. And we should be doing that, independently of their ancestors.
[1] https://www.theguardian.com/travel/2016/apr/13/barcelona-sla...
[2] https://www.lavanguardia.com/cultura/20200622/481890711216/a...
[3] https://aldianews.com/culture/heritage-and-history/very-prof...
[4] https://www.bbc.com/news/av/world-latin-america-48476378
[1]https://militarymaps.rct.uk/war-of-the-spanish-succession-17....
The war of Spanish Succession was between the countries you mentioned, as well as Catalonia as a part of both Spain and France. One important event in that war was the formation of an army of Habsburg loyalists by Catalonia to dispute the treaties of Utrecht. This in turn led to the Nueva Planta decrees and the end of Catalonia as an autonomous principality within Spain.
If you have any more questions about imperial Spain (particularly the colonies) or you'd like me to go into more depth, feel free to ask.
If the Colombians don't give the treasure willingly the Spanish will start calling them tight arses.