If anyone has agency to stop earning their living, my guess is that they also have agency to express their opinion and hold someone else accountable for creating an hostile work environment.
Then you don’t have agency and need to deal with the nature of the contract. You take money, you put up with the circumstances. If you don’t need to take money, then you are free.
I’m sorry for all those stuck, but you need the money. In a desperate situation like that, where your own principles are secondary to your very survivable, it’s proper to shut up and do your job.
If you are in a position where your principles are not secondary, then quit.