Wasserstein Regression as a Variational Approximation of Probabilistic Trajectories through the Bernstein Basis