Since in 1804 Spain was an absolute monarchy, shouldn’t the present King of Spain—not the Spanish government—be the rightful owner, as the lineal heir to the 1804 owner?
Symbolically, the King of Spain is the owner. Just like Queen Elizabeth II personifies Great Britain, the Spanish Constitution defines the King of Spain as "the personification and embodiment of the Spanish State". Symbolically, the British Royal Navy is "Her Majesty's Navy" and the Spanish Real Armada is "the King's Navy". Thus, the Crown on the emblem of the Spanish Real Armada.
Since, by your screen name, it appears you are a Civil War buff, check out Post 52. The same maritime laws decree that the United States still has sovereign rights over the wreck of the Confederate CSS Alabama in French waters as the legitimate sovereign successor to the Confederate Government.