As Shanghai is on the coast, it is entirely hit or miss day by day. I was told that the level of pollution in Shanghai is far better than what happens inland.
The air pollution presumably depends on what direction and how fast the wind is blowing. You cannot get a correlation of pollution by month.
My experience:
I was at SDL twice in 2016 (May and August) and on both days the air was clear and sweet at SDL. Very hot, but sweet.
However, on an April trip to Shanghai (before SDL opened), visibility was good but the air had a slight chemical odor. No worse than NYC...I'd give it a 3
OTOH, I returned from my April trip through Beijing (inland location). Worst pollution I'd ever seen - my flight was cancelled due to poor visibility from pollution - a 10 on a scale of 10.
Because Shanghai is on the coast, I'd say your chances of having a bad air day at SDL is small and it should not cause you any concern.