Hi Bikemad,
The fact that the frame and engine number do not match is not important. the only thing that counts is the frame number
Mine is the same. Engine and frame did not leave the factory together, but registering was based on the frame number.
As well as in the UK or in Spain, or in my case Belgium, European rules apply when registering and/or importing a vehicle.
Mine was imported from the UK 3 or 4 years ago, but the PO never got round registering it, but still had the original UK V5 document.
When I bought it I had to go to customs to officially import it. Based on the existing V5, customs gave me the document to get it licensed in Belgium.
Easy as that.....!
I am not sure but it might be easier for you to import (if the papers that came with the frame are of UK origin) and register it in Spain, and after that re-import it in the UK.
Also a lot depends on the time when it became necessary to have a vehicle's declaration of conformity. This differs from country to country.
In Belgium it became necessary for motorbikes in 1972, so any bike produced/registered before that date don't need this document to get it registered again.
Good luck!