It really depends on how the person's problems affect the relationshop and you. For example if they are prone to murder or rape or otherwise hurt people, I think I would tend to make myself very scarce. But a lot of the time they have family or maturity or other 'nirmal' problems; just maybe more than they can cope with all at once.
Now, a relationship can be good in the sense it gives them an outlet; a person to talk to and openly discuss their situation. On the other hand, if they are always whining and complaining about everythgin then it isn't really that good to be in a relationship with them.
I guess I would use progress in maturing and learning how to handle problems as a sort fo barometer in deciding whether I felt like the relationship was a good thing. If they are talking openly and explaining things and seeking ways to reduce the problems or their severity and they are actually following through on things then that can be cool. But if they just winge and complain and you offer whatever you can and they are not even trying or are only putting minimal effort into it, then I would question the whole scenario.
And, of course, problem solving is a two way street so hopefully they are aware you too have problems and they are sensitive enough to want to help you too...