Because I have been in the hobby about 40 years and attend lots of train shows I get asked a lot about the value of secondhand trains. It is difficult to give an exact answer because it really depends on what some will pay on the day and how many buyers there are for that particular loco or car.
A lot also depends on whether the item has been modified, weathered, or is in its original condition with original boxing. Depending on the brand and condition, sometimes the value will increase if the loco or rolling stock has not been modified in any way.
In general I have found that weathering will devalue the item useless it has been done to an extremely high standard, in which case the reverse could apply and the value increase. Cars that are factory weathered can retain their value as they are factory stock as opposed to being modified by a home hobbyist.
Rare items (such as rare brass locomotives) should increase in value, but modifications to the factory paint and finish of rare items could devalue them.
When it comes to rolling stock, the value can increase based on any upgrades such as the addition of better trucks and metal wheels etc. A buyer might be prepared to pay a little more for upgrades if it saves them the cost and effort of them having to upgrade the item.
A final tip is to keep all the packaging and printed instructions that originally came with the item. This will help the resale value if or when you come to sell.