Indian Railways has been addressing the erosion of market share in the freight segment through various initiatives, including upgrading goods sheds and terminals, attracting private capital for logistics terminals, and operating time-tabled freight trains, as mentioned in the content.