As a part time Madrid resident, I can only recommend that you go to Madrid. However, I do find that Barcelona is more turisty with the Ramblas, Olympic Park, and the numerous Gaudi sites. But if you know anything about Spain, I think you may appreciate Madrid more.
Not too sure of your time frame, but I would suggest a visit to the Costa del sol...fly into Malaga and perhaps stay in Marbella. The Melia Don Pepe is a great hotel for a reasonable price. In Madrid, there are many hotels for many budgets. You can often use coupons at the Hotel Intercontinental which is on the Paseo de la Castellana...a main thoroughfare and relatively central location.
Feel free to email me if you want more specific information. I enjoy living in the states, but always look forward to my time at home in Madrid!