A judge has approved $32 million in penalties against Westpac in two cases brought by the corporate regulator accusing the bank of misleading thousands of “vulnerable” customers about their debts and failing to manage the accounts of deregistered companies.