Railguns would completely surpass missiles for StS warfareYes, but my thought is that it's possible that in the future, no one is going to care about surface warships shooting each other. My full prediction is: Either 1) Naval Railguns also wind up being killer AA weapons and there aren't any game changers in submarine warfare or 2) Railguns are going to be the equivalent of WWII naval cannon.
Navies will be important, but what people will care about is 1) the ability to interdict shipping, 2) the ability to prevent amphibious landings, and 3) the ability to project power. It's possible that technology will get to a point where ships fighting ships with guns is irrelevant to all three. One possibility is that navies will develop swarms of autonomous AI minisub drones which can deny the sea to surface ships. Autonomous flying drones could also yield such a change.
So let's say there is some game-changing development like the ones mentioned above, such that surface ships within a certain range of the enemy are no longer viable in combat. What will happen to the big railgun equipped ships? They will be relegated to shore bombardment, but only once air superiority has been established, and all other opponents have been neutralized: Just like their WWII forebears.
(If railguns can become killer AA weapons, then my prediction 1) applies. I'm not certain this will come to pass, however.)