We loved Madrid and, unlike many travellers, we enjoyed it far more than Barcelona. I liked touring the Palacio Royale, and I loved walking around the Centro Historico. El Retiro Park is lovely, and it is right near the Prado, so when you tire of all the wonders in the museum, you can enjoy the park. We loved the paella we had in the park. A can't-miss for us was the enormous Picasso painting, Guernica, in the Reina Sofia. One reason I liked Madrid was that I found the people in Madrid to be very courteous and helpful, as a rule.
We visited Toledo as a day trip from Madrid, but if you can work it into an overnight on the way to someplace else, you're right that you would probably enjoy it even more. We didn't find the crowds to be overwhelming (unlike Barcelona), but we did not have time to see everything we wanted to see. Bear in mind that you will probably want to store your luggage for a couple of hours, since there is usually a gap of several hours between check-out time and check-in time. Your hotel in Toledo will probably be able to do that. In Toledo, we particularly enjoyed the little tourist train that takes you outside of the city, where you can get the classic view of Toledo painted by El Greco. And, speaking of El Greco, there are several venues where you can see his work: https://www.thegeographicalcure.com/post/guide-to-el-grecos-art-in-toledo
As for Barcelona, well, of course it has some spectacular sites, especially the Gaudi structures. Booking in advance for these is a MUST, or you will wait in very long lineups. (We didn't book in advance for Park Güell, because we weren't sure how it would fit into our days, and we regretted it.) I particularly disliked Las Ramblas--too busy and too overrun with hawkers for my taste, so we avoided it whenever we could (difficult, since we were staying a block off it). Besides the Güell sites, the harbourfront, Barri Gòtic (where I liked the cathedral with the geese in the cloisters), and El Born (Basílica de Santa Maria del Mar and the Picasso Museum), we visited Montjuïc and were there quite late in the day, so it wasn't too busy. We walked down and came across the lovely Monument a La Sardana (sculpture depicting the national dance of Catalonia), which we had all to ourselves.
Our favourite restaurant in Barcelona was Teresa Carles. It's vegetarian, and we're not, but we liked it so much, we ate there twice (and learned the second time that it's recommended by Rick Steves--the people who sat next to us were on a Rick Steves tour).
The highlight of our visit to Barcelona, though, was a day trip outside of Barcelona, to Montserrat. I loved it and still count it as one of the most beautiful places I've visited. (Note that it does not take a full day to visit there.)
I haven't been to the other Spanish places you mention, but Lisbon is one of my favourite cities, ever, and, in my opinion, it warrants more than 3 nights/2 days, especially if you want to take day trips to Sintra and Cascais. There are many wonderful sights in and around Lisbon, but the ones that stand out most in my memory include the Lisbon Cathedral (with Roman Ruins in the cloisters), the Jeronimos Monastery, the castelo, and Sintra. Our favourite restaurant there was the Chapitô à Mesa--circus school by day, restaurant by night (but open for lunch, too).