Looking to spend several days first in Barcelona and then Madrid with a stop in Toledo, but wondering what other city to visit for 3 or 4 days?
We will be using the train to get around.
You need to say how you're getting around. Train? Car? Makes a difference. Spain is a large country for Europe.
You don't say how long you're planning to stay in Madrid, but if you have time I suggest a day trip to Segovia (from Madrid). If you want to spend a night elsewhere, you can't go wrong with a couple days in Sevilla (3 hours on high speed rail from Madrid).
I agree with CL. Take the high speed train from Madrid and spend 2 or 3 days in Sevilla.
You could use those days doing daytrips from Madrid: Segovia is 1 hour from Madrid & El Escorial is 45 minutes – two more worthy daytrips.
Sevilla would be my choice. Fantastic in all respects last fall. And at least over night in Toledo - Hostal Posada de Manolo near the cathederal.