I think that it is not a wrong sentence to add んです directly after わるい but it should be that せいせきがわるいんです。
I think this sentence which is added んです shows the person's feeling or reason.
For example せいせきがわるいんです。(That's why I feel down) , おなかがいたいんです。(That's why I look pale) .
If you say only せいせきがわるいです。おなかがいたいです。, they are just only answers of question.
But if you use んです in your sentence, it shows your feeling that you want a questioner to understand your feeling or reason.
So that your sentence せいせきがわるいんです is correct.