I've said before here that there is value in reading poor quality writing. Avi says something similar in his blog post The Anatomy of Mediocrity. It's not so much that I read dreadful writing and think, as he does, “I can do better than this!” Or, “I write better than this!” In my case, it's more like, I hope I can do better than this, or Dear God, don't let me write this badly.
But, yes, you can learn from reading writing you don't like. It becomes a model for what you don't want to do.