TJX and three bankers groups have settled a lawsuit over costs related to the discount retailer's record data breach that may have exposed as many as 94 million accounts, the parties announced Tuesday.