I really don't think railgun on ships is viable. But land based railguns/coilgun in Fujian make sense. They can be much larger, so acceleration wouldn't be as much of an issue, they are connected to the grid, so power won't be an issue, repair and maintenance wouldn't be as much as an issue as they would be on a ship. They are mainly are to be used for bombardment of targets in Taiwan, they would have the range to do so. They can also help to provide anti-ship and anti-aircraft fire support for ships in the Taiwan strait if it ever came to that.
Hell, with a long enough barrel, hundred meter+, you could get it to launch anti-ship missiles/drones/sensors for a range boost. Maybe even use it to get cheap ramjet drones/missiles into the air.
For a hundred meter gun barrel, to reach mach 3 would need a constant acceleration of 510 gees. Might be ok for most anti-ship missiles.
The question is, is it worth it compared to just using the money to buy a few dozen more conventional anti-ship missiles or fighter jets?