Multitask diffusion adaptation over networks with common latent representations