Students learning other ways are not allowed to participate.
"You are expected to spend around 30+ hours a week working on your project during the 3 month coding period. If you already have an internship, another summer job, or plan to be gone on vacation for more than a week during that time, GSoC is not the right program for you this year."
However, it isn't exactly like an open ended job for the summer. There is a process by which students and organizations agree on a project for the summer so it is goal oriented.