Hi from Wisconsin,
Those are all great cities. But they are all cities. Have you considered dropping one, like the one trick Bilbao and including a couple days with a car in a rural setting? Driving in rural Spain or Portugal is simple. Typically little traffic and road surfaces that will make you envious.
Rural Basque or Portgual will include not only non-pavement foot experiences but really nice scenery, a slower pace, and great food at much reduced prices.
22 days is a very nice length for a trip. We do similar trips and our experience would recommend planning for jet lag crankiness at day 4, and a need to put your feet up and have a real slow relaxing, sit and enjoy a long meal and a few drinks, day or two around day 15.
Just because the trains aren't high speed doesn't mean they take all day. Check on the website, dbahn, for trip times. Go to, loco2, to huy tickets. Consider the wonderful time spent getting out to the airport, waiting in security lines, waiting on the plane, flight time, getting into town from airport time and not seeing a single thing of the country you are touring. Trains are pretty much located in city centers, they might scan your luggage, you get on and the train takes off on time, arrives on time in the destination's city center. And along the way you see the countyside.
And buses are a modern dream in Europe.
Wayne, iNWI