Not specific to this tour, but I like to end my trips at a large enough airport that I can get a direct flight to a US city, in your case, that is likely Madrid (Could be Barcelona, but that is a longer train ride...that goes through Madrid). Direct to SFO would be nice, but even an interim stop in the US is better than a stop in Europe on your way home.
One big advantage of a direct flight is that you can get a departure at a reasonable time, 10 AM or later. I have seen too many posts on here of people who book flights from small airports, than ask how they can get to the airport at 3 AM for an early flight.