Understanding Domain Learning in Language Models Through Subpopulation Analysis