Not unless it is in free EU circulation (ie you imported it and paid VAT) .
At GCLB there is also the special tax area of the Canaries where an ad-hoc import has to occur.
So yes one can have an N-reg based in Spain for more than 180days if the aircraft is in EU free circulation nothing to do with it’s foreign registration or possible transfer to Spanish registry (some EU countries have their own limits, in Danemark you can’t have a D-reg or N-reg “parked long term” even if it’s in free circulation unless you will be transferring it to Danish reg soon)
Norway Denmark and Sweden ban long term parking of N-regs apparently. But that is nothing to do with this topic which is basically getting busted for import VAT or some other aircraft related tax liability.