1. Several states have political views/party membership as an explicit protected class under state civil rights laws. If a DeSantis type governor got elected in one of those states and wanted to aggressively bring "hostile environment" style civil rights cases on behalf of conservative students and student groups subject to protests, etc, they presumably could. Also, these political discrimination laws are usually explicitly applied to private institutions/employers as well.
2. In a state that doesn't have political views as a protected class but does have party registration, I think there would be nothing stopping a legislature from requiring that public institutions select faculty and students so that party registration at the state university matches statewide party registration? Even in an open primary state, they could try to do this based on R vs. D primary turnout, because which primary someone voted in is a public record. However, this would be aggressively gamed. If you know that UT Austin or the University of Florida is now required to admit and hire more registered Republicans/Republican primary voters than Democrats because statewide Republican registration/turnout is higher, well, there's going to be a lot more "Republicans." Quite possibly enough to defeat conservative candidates in the primary!
3. A conservative legislature concerned about this issue could change state law or propose an amendment to the state constitution to require confirmation votes in the state legislature for university administrators, admissions officers, and candidates for tenure at public institutions. This would seem to be the most direct way of moving the needle. However, it's easily attacked as "replacing academic freedom with a fascist spoils system" or the like. It would objectively be hilarious though if Scott Walker became the next president of UW Madison or Ted Cruz became the next dean of UT Law.
This is also what I was thinking. In term of constitution and Federal law, it seems perfectly legal to affirmative action on political views. But why they haven't done that?