Here is the Russian response, published by the RT propaganda site, to the missile attack on Poland:
The US is coordinating with Poland to verify that the attack really was from Russia, although it seems to have happened during a massive missile attack against civilian targets inside of Ukraine. It's possible that a couple of Russian missiles simply went astray. Conceivably, they may have classified information from an AWACS flight regarding the trajectory of the missiles.
I don't see any reason why Putin would order a deliberate attack on Poland, given the risk of confrontation with NATO, but it is also possible that elements within the Russian military could have deliberately targeted the Polish town as a form of provocation. There are certainly lots of idiots in Russia who are crazy enough to try something like that, and we now can see how undisciplined, uncoordinated, and unprofessional the Russian military is.
The most likely explanation that occurs to me is that the attack was part of Putin's kneejerk response to the humiliating defeat and retreat from Kherson. His military was ordered to carry out the attack on civilian infrastructure in Ukraine as a way of stealing attention away from the panicked retreat, which apparently involves evacuations even from areas on the eastern side of the Dnipro. The attack on Ukraine was so large and hastily planned that a couple of missiles could easily have gone astray near the border of Ukraine and landed in Polish territory.