The thirteenth amendment was never intended to remove any power to enslave by the state.
Being subject to the provision of law at issue is something people voluntarily accept when they apply for a license to practice law in the state, and for which they receive benefits not available to the general public in exchange.
> Or are there other precedents for forcing people to fill government roles?
Yes, specifically within the judicial system, even. See, e.g., jury duty, which does apply to the general citizenry.
Supreme court precedent on this is actually pretty clear, and it comes down to "pretty much nothing but actual slavery is considered involuntary servitude".
See, e.g, Arver v. United States (the involuntary military draft is not a 13th amendment violation).
If the military draft is not a 13th amendment violation, i think you are going to have a pretty weak argument having to defend some guy in court is.
Once things get grim enough, the army will take anyone. Towards the end of the second world war, the Germans were drafting children and old men.
Right, you can't quit the militia, as that term is understood in the interpretation of the Constitution, and there is an express Constitutional power of the federal government to call up the militia.
OTOH, the existence of that express Constitutional power and the long-understood Constitutional meaning of "militia" means that military conscription isn't a good reference point for the Constitutionality of any other type of mandatory public service.
Edit: Weird that this is being voted down. Conscription is involuntary service by definition, and has been used by the US government within living memory.