And although I wouldn't worry too much about language too much if your focus is primarily on work, Spanish is perhaps the easiest language to learn as an English speaker. You can achieve professional level fluency in 600 hours of study. Certainly with 80-100 hours of concentrated study and continued practice after that you can learn more than enough to get by in daily life.
Two big advantages with learning Spanish: 1) pronunciation is easy to learn and is the same for both written and spoken Spanish; 2) there are lots of cognates, so if your English vocabulary is good then you already know lots of Spanish words.
Spain is great, but for the purposes of picking a country for working remotely and having a longer runway, I would argue heavily for Mexico over Spain if you're picking a Spanish speaking country. The overall cost of living is low, internet access can be great depending on the area, you'll be on a similar timezone as the US, and services (cooking, laundry, babysitting, etc) are very inexpensive - leaving you with much more time to work (or to use your downtime more effectively than running errands/etc).
Both are pretty easy, though, and Spanish opens up a lot more of the world. But Italian is just so darn fun :)
Your impressions are correct. While some violence is greatly exagerated to paint a picture (For instance, Chicago, St Louis, Baltimore, Washington are more violent than São Paulo or Rio de Janeiro), it still is MUCH safer in Europe or Sillicon Valley/New York.
Barcelona is awesome and it's cheap (spent a total of $800 for the whole month on food, living, etc.). Highly recommend for someone on a budget who wants to hack away.
On the other hand, living in Spain and speaking fluent English can be almost like a superpower in some circumstances.
(And for the record, my native language is Spanish)
Presumably you go to large cities for the social interaction.