Finally on the 10th of May of 2017 our Constitutional Court has declared that town halls cannot charge plusvalía tax if you sell at a loss. The writing has been on the wall since the 16th of February of 2017 when the same court made the same judgement but unfortunately limiting it´s effect to the Basque Country. They have now extended it´s effect to the whole of Spain.
Unfortunately town halls do not seem to be applying the sentence and collect as usual so this would mean that you would need to pay and then if it is worth it make a claim.
To read about the other expenses you will have when you sell your property.