I don't think there is a commuter train. You can get a train to Philadelphia and then a train from there, but the only way I know of to get from the Mechanicsburg to Baltimore is by Greyhound bus from Harrisburg I think it is possible to transfer to the commuter rail in Timonium Light Rail - Stop 37, but I think it would be way easier just to take the bus the whole way
Mentioned in this answer: