Transfer learning for atomistic simulations using GNNs and kernel mean embeddings