The Soviets would attempt to solve it by requiring the graduates to work off about 3 years in the place chosen by the joint commissions from Gosplan/Ministry of Labour/Ministry of Higher Education (those same commissions determined the number of students to enroll in the first place, so...). And this system (called "distribution", as in, "distributing the graduates to the workplaces") was widely unpopular for obvious reasons.
In the US today, they try to entice people to those places by forgiving their student loans if they work there long enough.