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.
We're not making stuff up. If I run a competition and someone from Belgium enters (and wins) but I have no presence in Belgium, I'm in no way subject to Belgian laws. How can I possibly be? Google doesn't have offices in Venezuela, Colombia, Bolivia, Chile, or South Africa. I highly doubt they're complying with local laws regarding competitions in these jurisdictions!
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.
I understand that this is something people don't get, but: yes, if you are doing something that can be construed as "doing business" in a country, then you get to be subject to that country's laws regardless of whether you have offices there or have ever set foot on that country's territory.
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.
Such laws would be really, really difficult, if not impossible to enforce.
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.
Enforcement's not so terribly hard. Look at the US campaign against online gambling; when they want to crack down, they can cut off the flow of money to customers in the US.
If you pay money to someone from Belgium for a service (which, in a legal sense, is how Google Summer of Code works) then that transaction is definitely subject to Belgian laws.
Just as if you sell something to someone from Belgium over the internet, both your and their law applies.
If I sell something to a Belgian and I'm, say, a Canadian company, I don't suddenly become subject to Belgian law. I don't have to account for distance selling regulations, data protection regulations, VAT, local taxes or anything else. I'd be subject to Canadian law, and that's all. Chances are the contract would even state that the jurisdiction were somewhere in Canada. (Yes, I know contracts aren't always perfectly binding or valid, and just because something is declared in a contract doesn't mean it's enforceable or valid.)
Consumer could sue in Belgian courts but the matter of jurisdiction would arise and that's where the claim would fail.
Jurisdiction may be disputed, and yes, in sales disputes it might be decided that Belgium doesn't have jurisdiction over that contract if you have no subsidiaries or other relations there. Still, even in your case the "target" country law does apply for whatever things happen on their side of the border - and it may impact you. Say, if the item is considered illegal there then it may be confiscated at customs, leaving you without the item and payment; and your local courts won't help you there.
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.
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.