Prosecutors have absolute immunity from liability for their discretionary non-investigatory actions in criminal prosecutions (like deciding to prosecute and recommending sentences; they have qualified immunity for investigatory actions like preparing search warrants), and judges have absolute immunity from liability for their judicial action.
Sentences are reviewed on appeal on two standards. They are void if they exceed the statutorily authorized maximum sentence for the crime, and are reviewed for abuse of discretion if they do not. Past sentencing decisions imposed by trial court judges under the statute are not precedents that bind future cases.
Normally, a misdemeanor sentence that is less than the statutorily authorized maximum sentence for the crime will not be found to be an abuse of discretion by a judge unless a judge publicly states or strongly implies on the record that the reason for the sentence is an impermissible reason including one that would violate the 14th Amendment, such as race.
(A judge who stated a reason on the records that was race would also face judicial discipline proceedings and might be removed from the bench, but that wouldn't make the person sentenced any better off.)
I can imagine a case where a large statistical sample showed unequivocal racial basis where a class action lawsuit seeking to declare all or some portion of the entire criminal justice system in a state was unconstitutional as applied under the 14th Amendment, but even very strong statistical evidence of racial basis in death penalty sentencing has not prevailed in 14th Amendment litigation in the past, and those rulings are binding precedents. A case brought on that theory might not be frivolous and might get to trial, but probably wouldn't prevail on the merits.
The 8th Amendment likewise has been interpreted to be a dead letter in all but the most extreme cases. Sentences to life in prison without possibility of parole for recidivist offenders have been upheld for shoplifting, and a case sentencing someone to decades in prison for writing a bad check as a non-recidivist was considered a close call.
If the underlying conduct prohibited by the statue may constitutionally be punished as a crime, the likelihood of a misdemeanor sentence much more severe than is typical for that offense being overturned at all, let alone on constitutional grounds, is very low, even though it shows all of the trappings of unconstitutional racial discrimination in context.