Generally, I'd say no, OTC medications are not safer than prescribed medications. However, I disagree with the opinion that they are more dangerous. Primarily I'd like to address a misconception people have about OTC medications (meds). (I will not discuss dietary supplements - also potentially very harmful - because the FDA does not regulate these.)
Many people think that OTC meds are safe because "the government wouldn't let a dangerous medication be sold over the counter, would they?" In the US, the "government" usually is a reference to the Food & Drug Administration. The answer is:
Yes, the FDA does allow dangerous medications be sold over the counter.
Just look at acetaminophen/paracetamol (ACAP). Before blister-packs were mandated for ACAP, it was the drug of choice for suicide in the UK.
While it is true that the FDA must approve both OTC and prescription drugs, they are assessed for safety, efficacy, possible drug interactions, and appropriate dosages. ACAP is OTC because used as directed, the benefits significantly outweigh the risks. This does not address OTC meds that were once FDA approved but have lost approval because of poor labeling practices1
Are prescription medications safer because they are "prescribed"? Not really, because many patients (in many studies, up to 50-60%, which is believed to be an underestimate) don't take their medication as prescribed. This poses a significant burden to health care costs and utilization.
Clearly not all medications eventually become OTC - I don't expect to ever see chemotherapy drugs go OTC, for instance. But many do. This has something to do with patent expiration, being beneficial to patients who can't afford a physician for treatment of common illnesses, e.g. gastric reflux or (in days bygone) gastric ulcers. Allergy medications usually become OTC, antibiotics (in Mexico and other countries), etc.
Drugs are drugs, inherently dangerous when the risk outweighs the benefit or when used improperly. So is water. Too much or too little will kill you; it doesn't mean bottled water is safer than tap water in that instance.
1 Unapproved Prescription Cough, Cold, and Allergy Drug Products: Recent US Food and Drug Administration Regulatory Action on Unapproved Cough, Cold, and Allergy Medications
Patterns of use and public perception of over-the-counter pain relievers: focus on nonsteroidal antiinflammatory drugs
Long-term Persistence in Use of Statin Therapy in Elderly Patients