As for being realistic, this is a very realistic idea.
"Turning it to a hospitals needs huge time, money, manpower" - Actually, no. Modifying an A/C coach into a hospital doesn't need much time. It has been done before and can be done again.
China built an entire new hospital with 1000 beds and 30 ICUs in 10 days. That will tell you how it is important to have these facilities.
Even...
more... if it costs a lot, isn't it an essential expenditure? True, people will have to come together to work and build these things, but that is a necessary risk.
And this is not a random idea - Central railway started an initiative called 'Railway Ambulance' in 2017 and already has a fully A/C train with all facilities to treat 50 people. Other zones also mulled on doing this at that time, but did not do it as there was no pressing need.
You must also remember that there are 100's, if not thousands of villages that do not have any proper hospitals to treat this new disease. Due to the curfew, it is a big problem for people to travel for long distances and reach hospitals. A railway hospital can be easily stationed at a suitable station between major stations, so that people from the nearby villages can access it.