Stochastic Inverse Problem: stability, regularization and Wasserstein gradient flow