I don't think this is a VAT/IVA issue but related to income/corporate tax.

It's somewhere in the DTA but in most cases it's ignored. It only applies to certain professional services.

If it's deducted insist on a withholding tax certificate and you can recover against your UK corporation tax.

The other alternative is that your UK tax office will issue you a letter in Spanish in an agreed format between both jurisdictions which confirms your company is tax resident in UK and then the paying party in Spain does not need to withhold tax.

The tax office in the UK used to issue a general letter but a few years ago it became necessary to get one for each transaction.

Call your tax office and they will tell you the procedure etc