A California-based bank is expected to pay $31 million after it was accused of avoiding giving mortgage loans to would-be homebuyers of Black and Latino descent.