While its hard to diagnose in cyberspace, my intuition tells me that its your hip flexors, not your hamstrings, that may be the culprit. Tight hip flexors cause something called reciprocal inhibition with the gluteals. The hip flexors over work, which means that glutes under work. The hamstrings end up doing what the glutes are supposed to be doing.
But as you pointed out, you may already have a muscle imbalance which makes your quads stronger than your hamstrings. When the quads are overly strong, the hamstrings are weak. So weak hamstrings are doing the job of what the gluteals should be doing. As a result, they hurt.
So you stretch them, right?
Well, not exactly. Stretching can actually weaken a muscle in some cases, which can perpetuate the problem. Are you still with me? Good!
So, we have weak hamstrings doing the job of a weak butt, and over working quads and hip flexors that are probably pulling the lumbar region into too much extension. Back muscles love to work too hard. In your case, it sounds like your back muscles are compensating for other muscular imbalances.
Your first step would be to get to a good PT. As far as stretching goes,do a search in this forum for "foam rollers," hip flexor stretches," and "quad stretches."