Worth very little, for sure. Almost no metal value and bent and rusted so it would be hard to restore to use. But I have used similar ones for pins in a tractor trailer hitch, just stuck in a hole and no nut on it. The square head was used earlier than the hexagonal heads used today, or maybe for a special purpose, such as the RR as you suggest. The threads look common and machine made. Just a guess it is from the early to mid 1900s.