Is there a specific mechanism for the delivery of pain medication?
Short answer
No, orally taken painkillers act systemically.

Background
Taking a painkiller orally results in the drug being taken up into the bloodstream by the digestive system. From there it can potentially reach all tissues.  

In other words, a pain response does not act as a chaperone. A hypothetical drug that would home in on tissues with a pain response, while avoiding unaffected tissues would be the ultimate painkiller, if it existed.   

EDIT: To emphasize that painkillers act systemically I will elaborate on aspirine's pharmacokinetics. Notably, aspirine's actions are not restricted to the pain centers in the brain, and I quote the following excerpt from Wiley's interactive Concepts in Biochemistry]1:


  Aspirin's analgesic and anti-inflammatory effects are due to the drug's ability to stop the production of prostaglandins that cause tissue swelling and pain.


Aspirin's antipyretic (fever-reducing) effect is due to its direct action on the hypothalamus gland, which results in vasodilation of peripheral blood vessels and sweating.

Prostaglandins are also the key mediators of platelet aggregation. By modifying the COX enzymes within platelets, aspirin causes platelets to lose the "stickiness" that is needed to stimulate blood clotting.

Hence, by these examples it can be seen that aspirine works in the periphery (wound swelling and pain), centrally (brain's hypothalamus) as well as in the bloodstream. Hence, aspirine (and other orally administered painkillers) do not target specific areas in the body, and most certainly not only the brain.  

There are such targeted drugs, however. An interesting one is carbamezipine, an anti-epileptic that blocks Na+ channels. It blocks Na+ channels only when they are in an active conformation, however (i.e., engaged in action potential firing). Epileptic activity is basically paroxysmal (massive), synchronous over-activity in the brain that is accompanied by massive Na+ channel activity. Hence, epileptic activity will in effect trigger the drug into action.