I think that all of Spain is a good place to retire, it's a very beautiful country and it really doesn't matter where you'll stay, my opinion. Just choose the area you like.
That's a wonderful idea, if you have the money for an apartment in Dubai, but I don't think that you will make a fortune with just one apartment, good luck though!