I have worked at public and semi-public universities in three states and never heard of any such law. I think most institutions would view such a law as an infringement on academic freedom, and push back against it.
Of course, there is usually some level of oversight by the state government: e.g. governor appoints board of trustees, who appoint university president, etc,. So if the government thought there was excessive bias, they could exert pressure in a variety of ways. But I haven't heard of this being at the level of legislation.
For a private non-profit university, if it got really extreme, the IRS might decide that the organization's purpose had become political rather than educational, and they could revoke their tax-exempt status. I haven't heard of this ever actually happening.
Note also that it's a bit misleading to speak of "a university inviting a speaker". Except in very high-profile cases, most guest speakers who visit a university are invited by individual faculty or departments, student organizations, etc. If they are paid or reimbursed for travel expenses, these costs usually come out of discretionary funds controlled by the department or club, which may have originally come from private donations, etc; not necessarily tax dollars. It's all very decentralized and high-level university administration is rarely involved in such decisions. So even if there were a pattern like you describe, it would be hard to attribute it to the university per se.
In any case, the vast majority of visitors would typically be speaking on specialized academic topics with no connection to any of the political issues you mention.