No, it's not being given away for free. They're willing to give it to a developer at zero cost so long as the developer restores the village to a satisfactory state, which will almost certainly cost more than it will be worth at the end. The Spanish property market is a bit broken. Always has been.
You know what they say about things that sound too good to be true...
The outcome will be the Spanish Government will hit you for land tax, building tax, restoration tax, planning tax, inspection tax and tax to anything you can think of. They will take you to the cleaners and then some.