First, the "rules" for setting adverbs are independent of what kind of sentence it is. That is, it's irrelevant that it is a subordinate clause. So, if it were a main clause, you would have the same issue.
Ich kann besser Sprachen verstehen (als meine Eltern).
Ich kann Sprachen besser verstehen (als Mathematik).
Ich verstehe Sprachen besser (als meine Eltern).
Ich verstehe besser Sprachen (als Mathematik).
Adverbs are placed according to what it modifies to. Does it modify verstehen only or does it modify Sprachen verstehen? That's the question you need to answer and then you can decide where the adverb belongs to.
For the main clauses that I listed above I added a comparison in parentheses to show a different use case. This is what feels most natural to me, but especially in spoken language besser might be put at the other position, though.
However, this general question is very broad and I can hardly give you a thorough answer on that.
In your very example with the subordinate clause the first sentence is more natural. The thing is that you – so to say – already understand languages, but by learning German you understand (them) better.
Still, if you would add a comparison with maths, you'd go with the second sentence. And as said, in spoken language this is often swapped anyway. And finally, the connotation is so subtle in that example that it really becomes almost irrelevant.