How robust is unsupervised representation learning to distribution shift?