If there were more available units, you could leave and go to one with better maintenance. There'd be actual competition between landlords to keep tenants.
Not ideal, obviously, since moving is a pretty big life event. I'm not saying increasing supply is the solution to every problem with landlords. Being allowed to withhold partial rent if common elements are broken would probably be a better solution in this particular instance.