Gastly can be exceptionally valuable later on if you invest some training into it, and especially if you can trade in order to evolve it. Having a Haunter or Gengar against Morty would be pretty convenient, especially if you don't have anything else that has a super effective move to use against Ghost-types.
I'd say that's less true for Geodude or Sandshrew; they don't have much late-game utility. Steelix, however, can end up being amazing if you're able to trade for it - and even before that Onix is effective against all the first four Gym Leaders. It won't do well against Chuck, but it'll be fine going up against Jasmine if evolved.
You have to sort of think of them as an investment; Onix is good in the beginning and as a long-term team member if you can evolve it, as is Gastly despite the harder leveling. The others, not so much.