If you hang your display shelves level, the rolling stock you placed on them will not roll.
On the other hand, I built several display cases that hang on a wall using only wood for my train club. Mostly built from 1x stock with 2 grooves spaced 1&1/4 inches apart for the wheel gauge spacing. They were painted to prevent rust from forming on the wheels. I will send a picture of these the next time I will go to the club.