California has adopted a law providing legal representation at state expense in certain non-criminal family law, eviction and foreclosure suits. Previously, publicly appointed counsel was available only in criminal and termination of parental rights cases, and in rare cases where courts appoint counsel so that a position can be properly represented (often in appellate cases).
I've argued for something similar in the past, particularly in custody cases where the interest of the parties is significant, but the parties may all be indigent. The representation will be funded through court costs.
Those who think that it is more expensive to hire lawyers in these cases than to let the parties fumble though the court process should look at the tangles these cases routinely produe and then think again.