Suppose I want to travel from Berlin to Warsaw. Does it matter if I purchase the ticket from the German side (Deutsche Bahn) or from the Polish side (PKP)? Is there any European-wide regulation that mandates international train tickets to be sold at the same price at either end?
Yes, the price depends on where you buy the ticket and there are in Europe no regulations mandating that the price for a specific train service must be kept the same, independent of from which company you buy the ticket.
The prices for flexible, full-fare tickets are usually in the same ballpark, perhaps with some variations due to fluctuating currency exchange rates. For example, a full-fare ticket from Berlin to Warsaw is €66.80 when bought in Germany and PLN263 (about €63) when bought in Poland.
Saver tickets, which usually must be bought some time in advance and will be bound to a specific train, are however in most cases based on national discount schemes and may differ significantly in price depending on where you buy the ticket. For an arbitrary train in a few weeks time from Warsaw to Berlin, you can get a ticket from the German Railways for €34.50, while PKP will currently charge you about €53 for the same ticket.
In addition to Tor-Einar's answer, I'd like to give some background.
All central European railway operators will sell tickets according to the SCIC tariff (sorry, Wikipedia only has a German page for this topic). This allows you to buy a Ticket within France at a counter in, say, the Netherlands, even when the counter does not have internet (and hence the price has to be determined offline). This tariff is relatively simple and has a relatively high price per kilometer.
However, this tariff is only for connections in other countries or the "foreign" part of a journey. If you, for instance, buy a ticket in France for a connection in France, you will pay the French tariff instead. This can be less or more.
As an example, the SCIC tariff for the inner-German connection from Bochum to Dortmund is 4,80 Euro, and the tariff does not have restrictions on the type of train that can be used. If you book a flexible ticket for the ICE train type with the German railway operator (DB), they will charge you 14 Euros for this (which is why most passengers use a cheaper local train for this short connection). The difference is because there is a fixed surcharge for using ICE trains on flexible tickets in the domestic tariff. The SCIC tariff does not know such surcharges.
The SCIC tariff can also be applied to a part of the journal. If you buy a ticket from Germany to the Netherlands, the SCIC tariff may be used for the Dutch part of the journey if you buy with Deutsche Bahn. If you buy with NS, the tariff may be used for the German part of the journey, hence the different prices. Individual agreements between the operators may take priority over using the SCIC tariff.
Inflexible Saver tickets are not part of the SCIC tariff and are subject to quota. The quotas are typically different for the operators involved in a journey. Hence, for a journey from France to Germany, for instance, it makes sense to check both the SNCF website and the DB website.