Massachusetts has agreed to pay $56 million to settle a class-action lawsuit brought by the families of veterans who died or became sick after contracting COVID-19 at a state-run veterans care center during one of the deadliest outbreaks at a long-term care facility in the U.S., officials said Thursday.