Gilles, welcome to the Spanish tax authorities. Sort of like Argentina.
I’ve read in the Spanish press that if your case is well documented and you appeal in the right way you have a good chance of getting your money back. However, you have to cough up first, then claim back later, and I hear that in Valencia they are now simply taking money from private accounts without warning.
More info on how to appeal Spanish bargain tax (extra ITP)