Is there a reason why you want to have just one base yet make several multi-day trips to other places? I would divide my time into smaller chunks and establish several bases. The total lodging cost might not be higher, because you'd not be double-paying for so many nights. For sure your transportation cost would be lower, and your time spent on trains and buses might be less. Personally, I do not like making multiple day-trips along the same route, and having a single base will limit your range.
If you stayed in multiple cities, you could spend most of your time in the south, where the weather should be nicer, and include Barcelona for a while. Being coastal, that city shouldn't have bad weather in November and December. Madrid, being inland, is usually considerably cooler than Barcelona in November and December; the differences are about 10 degrees Fahrenheit, on average. Madrid is also wetter at that time of year.
For monthly averages you can check out the Climate chart included in the Wikipedia listing for most cities. For day-to-day, historical weather statistics, go to timeanddate.com. I really like the temperature graphs on timeanddate.com; they overcome my tendency to look only at the monthly average high temperature, forgetting that I will be outdoors early in the morning and late in the afternoon as well as at midday.
For me, Barcelona's sights require more time than those of any other city in Spain, so it's a great place to really settle in for a while. There are also attractive side trips (including Girona, Figueres, Tarragona). With my interests (which include modernista architecture as well as art), two weeks would allow a nice visit to Barcelona and several days for the surroundings, but three weeks would not be too long.
Madrid is a big deal for its three major art museums. There are of course other sights (including the Palacio Real), plus some fabulous day-trips (Toledo, Segovia, Cuenca, Salamanca, Alcala de Henares; I was not impressed with Avila). With time spent exploring Madrid's various neighborhoods, you could spend seven to ten nights in the city and not be bored--as long as the weather didn't turn against you. However, I wouldn't choose Madrid at the time you'll be traveling; I do not like cold weather.
In Andalucia, Seville has more sights than the other cities. There are also some workable side-trips. Then you have Cordoba and Granada--both worth more than one day, but not requiring as much time as Seville for the average visitor. Granada is at altitude and will be cooler. Granada has potential side-trips, including the Alpujarras hiking area, but I don't know that the weather would be suitable in late autumn.
The Renaissance towns of Ubeda and Baeza (in northern Andalucia) are also cooler; most likely Jaen is, also. You can stay in one of those places and day-trip to the others.
In southern Andalucia you have historic Cadiz, Jerez (sherry and horses) and the nice coastal city of Malaga. You can day-trip from Cadiz to Jerez or vice-versa, and Jerez has bus service to Arcos de la Frontera, one of the white hill towns. Malaga has local-train service to some of the small coastal resorts, but I don't think they'll be very lively at that time you'll be there.
I encourage you to pick up a guide book with comprehensive coverage of Spain, or at least of Andalucia. Rick covers some of the cities in depth, but I think you need more breadth than he provides. Make a list of the places you feel you must see and those you'd like to see. Then spend some time on the Renfe website (or Deutsche Bahn if you prefer, though it won't give your fares) to see what travel times look like.
Out of space. To be continued.