¡Hola amigos!

I am trying to put together a trip to Spain that I will likely be taking toward the end of October. I am looking for some help on how many nights to stay in which city and what hotels are both affordable and nice in each city. I plan on staying in Spain for about 6 nights. There are two purposes of my visit. One purpose is simply to visit, see the sights and the history, relax, eat some good food, meet some interesting people, etc. Basically the normal vacation stuff. The second purpose of my visit is more of a reconnaisance mission. I am strongly considering moving to Spain soon (possibly March or April) and want to figure out where I would most want to live. The three main places I have in mind are Madrid, Barcelona, and Valencia. I prefer coastal, however I am considering Madrid also as it may be beneficial for employment reasons. Originally I planned on just spending 2 nights in each city (Madrid, Valencia, and Spain). But I don't know the cities that well and don't want to stay too short or too long in one city based upon how much there really is to do there. Obviously I wouldn't recommend to a Spaniard to spend 4 of his/her 6 nights while in the US in Nebraska. How should I split that up and is there another city or two I should really consider seeing as well for either purposes of my visit? Hotel recommendations for each city would help a lot also as mentioned.

Thanks in advance for any advice!

-Loc