Another consideration if you are US citizens is that you'd need a visa for China while you won't for Taiwan.
I have not been to Shanghai, but I really enjoyed my time in Taiwan the last couple of years. First visit it rained almost the whole time (in Nov). But I still liked it anyway and found plenty of stuff to do.