As p800aul pointed out – there is a 10 year guarantee on new build property in Spain. It is up to you or your lawyer to make sure it is in place.
I have a property in Spain next door to someone who has had work done on cracks in their new (2/3 yr old) home. The work was approved and arranged using the 10 year guarantee process.
I have used the NHBC in UK. They are absolutely useless – it took them 6 months to respond to our request – in the end we took legal action to “encourage” them to co operate.