When the Napoleonic wars ended in 1815 Spain was the third largest navy in the world after the UK and France .The loss of empire to wars of independence and the subsequent loss of empire ended that though and by the early 1900`s Spain was only a shadow of its former self with only a few old ironclads and a few modern ships which were mostly sunk at Manilla .
But what would it take for Spain to preserve a part of its once vast empire (Peru for instance ?) ,Industrialize ,and maintain some sort of navy .I am not suggesting that they stay the third largest navy in the world by 1900 .But maybe they can rival the Austrians and Italians ?
There fleet can consist of any mixup you wish ,just so long as it has a few BBs along with the long range Armored and Protected Cruisers they would need to police what remained of the empire .