Chronic mental illness, for those predisposed, can be brought on by a variety of stressors, of which bad trips can be one. You can look up the stress-diathesis model (1). Of course stone cold sober people can also be at risk of chronic mental illness from stressors; Look at mental health in followers of the LDS church, who abstain from alcohol, tobacco and caffeine. (2)
That means that people who are more predisposed to mental illness or under stress should be cautious around drugs (whether legally available or not), just like people with diabetes should be cautious about their blood sugar. It doesn't mean that drugs can't have beneficial effects and be used safely.