For Nancy Padilla, who spent 20 years living in shelters after leaving an abusive relationship, the excuses and rejections cited in the lawsuit sounded familiar.

After bouncing among shelters, Ms. Padilla finally found an apartment in Queens in 2018 that would accept her Section 8 voucher. But she said she spent hundreds of dollars on nonrefundable apartment application fees, just to be denied when she mentioned the voucher.

“The roller-coaster ride they put me in, I had a mental breakdown,” Ms. Padilla, 58, said. “You are playing with someone’s life.”