Hello Ann,
I'm not an expert in the Barcelona market, but I was looking at it some time ago. Prices have gone up quite a bit and are back or over pre house crash prices.
What would your strategy be? Unfortunately, Airbnb and short term rentals are heavily restricted. Your most likely option would be a long term lease, which in Spain is 5 years or longer!
If you want to check some properties and get familiar with Barcelona neighborhood and prices, check out www.idealista.es, it's their Zillow.
As for Berlin, I owned real estate there for a little over 10 years. I would stay away from Berlin. It is an amazing city if you want to relocate there, but the current real estate market is 100% investor unfriendly. Prices are very high, no chance to short term leases, leases have no term and only the tenant can exit the lease. Moreover, Berlin municipality passed a rent control law last year that wiped out real estate investing there.
Cheers and best of luck in your investing