Upvote:1
Generally, if you stayed in Canada and are now returning home, you don't need a transit visa to Korea:
Nationals of countries, except for the 24 xecluded countries (Syria, Sudan, Iran, Macedonia, Cuba, Republic Of Kosovo, Palestine, Afghanistan, Iraq, Nigeria, Ghana, Yemen, Gambia, Senegal, Bangladesh, Kyrgyzstan, Pakistan, Somalia, Uzbekistan, Nepal, Cameron, Sri Lanka, Myanmar, Egypt) that are not granted visa free entry into Korea. (a) Persons who hold a visa to the United States(including Guam and Saipan), Canada, Australia, or New Zealand, who transit through Korea to enter the abovementioned countries; or (b) persons who stayed in and departed from one of the abovementioned countries and transit through Korea bound for the country of origin or a third country.
However that same source (Korean MoFA) states that the rule is suspended due to COVID.
You might be fine if you're traveling on the same ticket and don't have to or need to leave the air-side since there are no immigration checks on the way. But you may run into difficulties if your YVR->ICN and ICN->PVG trips are on separate tickets, or if you stay in Korea overnight or need to leave the airport for other reasons (ICN transit tours are great, by the way), or if the airline has to confirm your eligibility before letting you board.