This is not true. Contests must abide by any local laws or regulations in any jurisdiction they're run in. If you don't run the contest in Quebec (e.g. if you disallow Quebecois entrants) then and only then are you exempt from their laws.
Google are subject to Quebec's laws because they have offices there and a Canadian subsidiary. If these things weren't, they wouldn't have to abide by such laws. Even if Quebec said they had to, they wouldn't have jurisdiction.
This is not particularly new. What is new is the general belief I've seen in many people that "but I did it on the internet!" is a magical answer.
I seem to remember there are certain laws the British government thinks applies to foreign companies that have no ties to the UK but otherwise do business with British residents, but in the same breath says they have no way to enforce them.
Just as if you sell something to someone from Belgium over the internet, both your and their law applies.
Consumer could sue in Belgian courts but the matter of jurisdiction would arise and that's where the claim would fail.
But in Google Summer of Code case, if it's treated as 'work for hire' then the host country definitely has jurisdiction as the actual work happens there. And Google has subsidiaries worldwide (used for ad sales), so they can easily be targeted.