RBS to rack up £42m legal bill over shareholder action, High Court told