Spent a lot of time in both cities. Both have their merits however I love the museum in Taipei. Don't need to worry about the weather.
add good friends, I would choose Taipei over Shanghai.
As others has mentioned, if you love huge cities, Shanghai can't be beat.