Nearly always the valve gear actually gives you slightly better timed valve events in reverse, which is kind of daft but is a result of various complicated compromises in the name of practicality which are very difficult to avoid, and were even more difficult to handle before we had computers to give us rapid and precise solutions to the mass of geometrical approximations comprising a valve gear instead of slow tedious approximate ones. So all else being equal a steam engine should actually perform slightly better in reverse. This is a minor justification for the cab-forward idea, and it is a thoroughgoing pain when designing Garratts.
It's hard to say what all else isn't equal, but in general there are lots of compromises in steam engine design and designers would of course always choose the one that gave a better result forward at the expense of backward whenever that was a factor.
Aerodynamics basically doesn't come into it, with the possible exception of different sizes for front and rear dampers. All steam engines are basically rotten aerodynamically whatever you do (the various forms of streamlining were all basically a joke, and a lot of the reason for doing it was fashion), and speeds are rarely high enough for long enough for it to be significant in any case.
But the biggest day-to-day variable in the performance of any given steam engine is the crew (simplest way to get a 10% improvement in anything is to paint it yellow and tell the driver it's an experiment). Crews almost universally hate running in reverse, and it's extremely possible that they simply don't perform as well in reverse because they're having a bad time in the first place.