If you are a spainish tax resident, and I presume your are becuase you wish to register the boat there, be aware that on top of VAT is a spainish matriculation tax of 12.5% ( levied on all means of transport imported into spain). It is the cause of a lot of "dodgy " boats in Spain.
I would make it a clause in the contract
that the seller must ensure registration in Spain. Certainly at the very least he should get a letter stating that the registration authorities have no objection
On balance Id walk away unless theres a good reason not to.
However the customs
office in Palma, seems to be very flexible, thats my experience. so teh VAT issue may be easily resolved, Make sure that the seller settles the VAT before you close the deal, as he can argue that vat is levied on the financial value of the boat and not the sale
value. I had that done and ended up effectively paying 6% VAT on the actual sale price
But you need to be sure you can register it in Spain. That needs a deletion certificate, a VAT paid document, a certificate of CE conformance ( if built after 1995) and the various bills of sale from owner to owner.
Note on teh VAT , if the seller was meant to pay the VAT and didnt be careful, make sure hes pays it and not you as technically he could b be penalised.