Many UK Freeview boxes do work in Spain and you can use a Freeview receiver / set top box in Spain.
The UK Freeview receiver will only receive the Spanish digital TV channels.
This is beacuase the Freeview box connects to a TV aerial, and in Spain only SPanish TV vchannels are available via a TV aerial.
Just like in the UK where you can only receive the UK Freeview channels via a TV aerial and not the SPansih TV channels in the UK via a TV aerial.
However, there may be some problems with using a UK Freeview set top box in Spain.
Firstly, you must ensure the box can scan frequency 69 – a frequency that is not used in the UK but it is in Spain.
Also UK boxes may not be able to change programmes into their original language as some UK boxes are programmed to look for English, Welsh and Gaelic language “tags”, where as in Spain they use different language tags like “Dos” or “VO” (Version Original), or “Multi” or “Und”, SET does use an “English” tag.