From Compression to Expression: A Layerwise Analysis of In-Context Learning