According to Baidu map, it takes 66 minutes from Xujiahui to Pudong Airport by subway, take 1 line at Xujiahui Station, transfer to Line 2 at People's Square Station to Longyang Road Station, and then transfer to the Pudong Airport Station by maglev train.
You can also choose to drive by car, the whole journey is 52.6 kilometers, which takes 57 minutes, passing through Outer Ring Expressway and Yingbin Expressway.