"我学中文" - "I learn Chinese"
"我学了中文" - "I've learned Chinese" [了 after a verb is a verb particle that indicates the verb is completed]
"我学中文了" - Depend on context, it can Imply "我(開始)学中文了" (I have started to learn Chinese) or "我(肯)学中文了" (I am willing to learn Chinese now). 了 after a verb phrase is a verb particle that indicates a change of situation. (change from not learning Chinese to learning Chinese or from unwilling to willing)
In "我学了中文了" (I've learned Chinese), the first 了 is a verb particle and the second 了 is a final particle.
A final particle is a particle placed at the end of a sentence to (a) indicate the sentence has ended (b) soften the tone of speech (c) to stress the sentence itself or add emotional tone to it.
"我学了中文了" is a valid sentence