I've had a few bad experiences, but almost all of my tablemates have been fine or interesting.
You will most likely meet some people just like yourself. New to train travel, maybe even apprehensive about community seating at dinner.
Just make polite conversation. Ask where they're going, where they started, is it their first time on the train? Yes? Well me too. What do you think so far?
In the case that you meet someone who is unpleasant, just learn how to deflect. Here's an (extreme) example:
Unpleasant Person: You know, I really can't stand the President. He's trying to take our guns. And force us to buy health insurance. I heard he was born in Kenya. Who did you vote for?
You: You know, I've always thought the ballot box was a private thing. Where did you say you were from?
Unpleasant Person: Missouri.
You: Oh really? I was in Saint Louis once, god, it must have been 10 years ago. I really liked the park where the Arch is. What's it called?
Unpleasant Person: I don't know. I'm from Kansas City.
You: Interesting. My husband and I are planning to visit there sometime soon. His sister just took a job out there. What would you recommend for us to do if we visit town? Any good restaurants we absolutely shouldn't miss?
Unpleasant Person: Actually, yes. There's this nice place down by Country Club Plaza. Do you like barbeque? Because we make it better than anyone else.
You: Well, I don't know about that. I hear they do a pretty good job down in Memphis. But I'll be sure to give it a try!
However, it's extremely unlikely you'll meet anyone like that. Most people have some "home training", as my mom would say. They know you're not supposed to make people uncomfortable or talk about controversial topics.
Talk about the train trip. Or the scenery. Talk about things you might want to do.
I was on the Coast Starlight several years ago on my first trip to the west coast. My seatmate was headed home to Portland, where I was visiting. I asked her if there were any neat things to do. She told me to climb Mount Tabor. It's a dormant volcano near Downtown. I took her advice and hiked to the top, and was treated to an amazing view of the city and the sunset. Something I never would have seen if I hadn't struck up a conversation.
Don't think of your tablemates as a curse. Think of them as an opportunity.