A service will be held to remember five railway workers killed after being struck by a passenger train as they carried out maintenance work.