Buy it here in Spain - far too much hassle and expense involved to re-register it here, and no advantage buying it there anyway. (Apart, perhaps, from being able to use it to get your "stuff" over here!)
Bear in mind also that the exact same models are not always sold in each country, and although all new car warranties should be valid throughout Europe, it doesn't necessarily mean that a dealer here will be happy to, or able to, fix any snags that materialise in the early days. I bought a new car in Spain with an engine/transmission configuration not available at that time on the UK market. When I brought it to a dealer in the UK for some warranty work, it wasn't a major problem, since mechanics these days are basically men in white coats who plug your car into the diagnostic computer and follow the instructions issued forthwith, but it did raise a few eyebrows, which didn't inspire a huge amount of confidence that they knew what they were doing with it. Had it been the other way round, I would not have been surprised to receive one of those Latin shrugs of the shoulders where the chin virually hits the chest, that says "ain't got a clue, amigo - never seen one of these before!"
Oh, and by the way, if you do decide to buy it in the UK, don't even think about getting anything without Air-con, because you'll never sell it again in Spain. I don't know about the UK market, but even the most basic Smart car has A/C here now. And boy, are you glad of it now!