We visited Lisbon in April 2018, and we did not pre-book any of the museums or other attractions. There were no lines at the Gulbenkian Museum or the Coach Museum. We arrived at the Sao Jorge Castle shortly after it opened, and there were no lines. But when we left a few hours later, lines were forming, but not awful.
We did have to wait in line for about an hour at the Jeronimos Monastery in Belem. If you can, I suggest buying tickets in advance. The line looked short, so we weren't worried at first, but it took us an hour to get to the ticket booth. That's because there were many tour groups, especially from cruises, that were allowed in first. There are also long lines at Belem Tower. So we took the elevator to the top of the Discoveries Monument instead. No lines at all! And the views are spectacular!
We visited Madrid in September 2017. We did not pre-book any tickets. We were are the Prado and Reina Sofia a few minutes before they opened, and we had very short waits, about 15 minutes. Waited in line at the Royal Palace for about 30 minutes. We arrived early, maybe 15 - 20 minutes before they opened.
We stayed overnight in Toledo. I booked our train tickets when they went on sale. I have heard that trains to Toledo can fill up quickly with daytrippers.