I believe that’s how it is in some places. In others, there’s no obligation after receiving a subsidized education, and this would be a way to fix that. I doubt many people would propose or defend a system where graduates are required to work for the state or go to prison.
Its certainly possible. There have many governments that claimed to own a citizens time, with just that effect. If people chose to work less, they were sentenced to gulags or death.
I was recently reading about the poet Joseph Brodsky's trial for sicial parisitism in the Krushchev era.
They committed the crime of unauthorized use of personal time to right poetry.
Seems fine if the government or another group was willing to lend or pay for education in exchange for future services.
I think it would be bad policy if the government made this the only way or a licensing requirement.
There are also some moral hazards if the exit Clauses aren't reasonable.