UBS Group AG agreed to pay $1.44 billion to settle a case with the U.S. Department of Justice regarding how it handled residential mortgage-backed securities.