I have lived in Spain, Argentina, and the UK.
I lived in Madrid for 6 months studying Spanish, but have spent a fair amount of time in Valencia. My wife's family live in Barcelona. I don't know you, so I don't know what your interests or needs are, but I would highly suggest you go spend at least a month there before you move. Or better yet, spend a month multiple times at different parts of the year (Winter and summer for example).
Things I liked about Spain: better weather than most of Europe, less of an "efficient" culture as compared to the US or UK. People did not work hard, that was my projection at least, it was a great place to be a student because of the night life culture (lots of partying). This was 20 years ago now though and I don't think I would enjoy that now. People eat late, stay out late, etc.
Things I did not like: Less of an "efficient" culture, meaning it would take weeks to renew my metro pass because the kiosk would simply not be open, or they wouldn't have the stamp to renew the pass, or or or, for weeks. It got annoying for someone who is used to efficiency. I hated the food. Like really hated it. I have never had worse paella in my entire life than in Spain. The jamon serrano can be good, and so can the churros, but so often things were so, so bland. I know this is not the reputation, but I know multiple people who have lived there that agree. The general culture is not warm. It's nothing like Mexico culture where people are warm and welcoming (in my experience). People almost never invited me to their home or were warm. I did have a Spanish friend who I had met in the US, and he was warm, but it wasn't like "Hola amigo," like it is in other places. Racism. My Spanish friend married a Mexican and she has told me that she often receives racist comments.
Valencia is a city on the coast, and it is larger than I would like for retirement, but that's just me. I liked it pretty well as far as Spanish cities go. You will likely see a barrage of drunken British tourists though. It's not pretty. But that is most coastal areas in Spain.
I hear a lot of people from the US are moving to Portugal right now. I would take a look there, probably before Spain. But that might just be because I have not been to Portugal. I hear the culture is a bit warmer than Spain.
I agree that the lonely ex-pat thing is real. I felt super isolated and miserable when I was in Spain, Argentina, and the UK even (though much less than the others). The language is hard to crack (harder than Mexican Spanish for example) and there is also a strong dialect in Valencia, IIRC. I just wanted to go home after 6 months and hang out with people I could connect with. People bashed the US to my face all the time. It got old. This was back in 2003 when the war with Iraq was going on. I was not in support of the war, but I got tired of answering dumb questions. Very hard to have a nuanced conversation for a lot of reasons (language being one).