It's just price differentiation in action. A Polish ticket for the same train can be a third of the price of an Austrian ticket. People are rightfully pissed when this happens to them online, yet they seem to accept it for trains. I don't understand it.
Austrians moving to Poland doing any specific job will pe paid exactly the same as the Polish. Similarly a Pole working a job in Austria is paid the same as an Austrian doing the same job.
The fact that there might be a wage difference between different countries might be interesting, but it us utterly irrelevant to the fact that there is a price difference between tickets sold for the exact same train. Not an Austrian vs. a Polish train -- literally the same actual train with the same finite, exact seats for sale.