Learning Markovian Homogenized Models in Viscoelasticity