A joint investigation by every state could force mortgage companies to settle allegations that they used flawed documents to foreclose on hundreds of thousands of homeowners. Lenders could be forced to accept an independent monitor to ensure they follow state laws and pay some people whose foreclosures were improperly handled.