On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recovery