25 years is just about right for railroad tie to start falling apart. In most jurisdictions (check for retaining wall info sheet on building or planning department website) walls over 3 to 6 feet (depending on town) require a stamped plan from a civil engineer to get a permit, as walls over that height are considered "structural" and a potential danger if they fall over. Also, some towns require a permit if over acertain $ amount for the whole job, and you may also have to get a planning and zoning permit if not replacing exactly as it was before - check your local government building and planning depart websites about that. Also, not to throw more troubles your way, if in a wetlands or below storm tide line you may need a coastal commission permit or a Corps of Engineers permit.
Replacement of railroad tie walls typically costs about $15-25/SF of wall. Depending on how the fences are installed, would be extra cost - particularly since to replace the wall means taking about about 3-5 feet of material from behind the wall to get to the deadman timbers or cables that should be there holding the wall back (maybe not on 3 foot or less wall height). Therefore, it is likely your neighbor's fence will have to be taken out and replaced too if it is "behind" the wall - or did I misunderstand, and the wall is keeping your higher property from collapsing onto his property ?
Generally, if the wall itself is on the property line, then the neighbor MIGHT have to share in its repair - depends on whether it is a wall that only benefits you, or it is necessary to support their land also. If totally on their land but collapsing onto yours, they have to fix. If totally on your land, then your problem only and you have to ensure, if you remove it, that their land (and fence) is not damaged by its removal. If removal and replacement affects their land, you should have a signed agreement regarding what you can do on their land to fix it, and what finish condition and grades of their land is to be when done, including how long you have to successfully revegetate if vegetated now. It may take a surveyor (bout $150 probably) to determine exactly where the property line is - if you have it surveyed, tell him you are planning on rebuilding or replacing the wall, and have him put in "construction offsets" or "on-line extensions" outside the wall area - rebar markers with flagged stakes that can be used to measure back to the actual property line, for use in constructing the wall where it needs to be, and finding the line in the future. As to responsibility for repair if the wall is on the line, you would have to talk to an attorney dealing with property line issues about that.
Landscape block is a possible replacement material at similar cost, or concrete at about double the cost typically. If you have room to play with, then a sloping stone revetment or riprap slope (typically up to not steeper than 1:1 slope) might be cheaper than a retaining wall, though that makes the surface behind the wall a slope so the property "behind" the wall now would lose some flat land.
Hard to advise not seeing the situation or knowing the height - if just a landscape/planter wall then I would say you have several choices - replace with landscape stone wall or wood (ties or treated earth-contact wood), put in a concrete wall, or revet it into a slope.
If over 3 feet high or retaining the earth on the neighbor's side, then I would say contact a local civil engineer who does residential retaining wall jobs and get an on-site consultation on what you can and can not do and rough costs - probably $150-250 range for a quick on-site consultation, then of course additional $ if you have him go ahead and design a retaining structure and does stamped plans for permit approval. You should also bring up the issue of permit requirements with him at the visit - he should know or have easy access to the maps showing wetland and coastal zone limits in your area.
One initial thing you should check on as this could REALLY affect your thinking - with building department, and with the local dump - if railroad ties are allowed in your area now for retaining wall use, and with dump to see if railroad ties can be dumped there at regular dump fees or if there is a high surcharge. Some areas like California have gone beserkoid about creosote treated timber because the environmentalists have gone crazy about the issue as a result of a few contaminated timber processing plants (which were really contaminated), but have extrapolated that to believing every telephone pole and railroad tie is a deathtrap. Therefore, sometimes it is a LOT cheaper (like up to $20 per tie !) to leave the ties in place and build a new wall in front of them, and encapsulate them in the fill behind the old wall - tricky if over 3 feet high as the deteriorating ties weaken the backfill (which has to be filled in from time to time as the wood rots), but can be the most effective way of handling in some areas, depending on codes.
Unfortunately, what the "best" replacement is depends on your financial situation, whether you can live with a slope instead of a wall (essentially no life limit and probably cheapest or near to it), how long you plan on staying in the home (affects capital cost decisions of cheaper (wood or piled paver) versus very long-term (retained earth block or concrete wall) solutions. An engineer can help you through this sort of decision making too, including giving you typical cost info for different types of solution.