In 立下了汗马功劳, how should I understand 立下了 ("set up") 汗马功劳 ("war exploits")?
立下 can be understood in a more smooth manner. It can represent set up as you said, when trying to express set up a contract or so. Examples include 立下誓言。
But in general it can also generalize to mean create, or make something happen. 立下誓言=make the 誓言 happen，立下汗马功劳=make the 汗马功劳 happen，etc。
Also, as Ho pointed out in the answer, 立功 is a common collocation, as earn credits for one's contribution. However I disagree with his understanding on properly usage of the 汗马功劳. Your example is completely correct in modern Chinese, and holds even in its original meaning (which specifies on military contributions).