Past simple transforms to past perfect?
They do mean the same thing. But without further context, the use of the past perfect in your second example is unnecessary, because there is no clear reference to some action in the past tense which is preceded by the leg injury.
For instance, in this example sentence:
My running coach was shocked to learn that I had had a leg injury until I was 15.
The coach was shocked at some time in the past, and it is clear that the leg injury occurred in the more distant past because of the use of the past perfect.