I would never buy a palace or castle even if I had the money, as I dread to think what the maintenance hassle would be like. But it’s always interesting to see what the options are in that line of property. Idealista have put together a list of palaces and castles currently for sale in Spain (listed with them, of course)