Dynamical inference for biological processes through the lens of optimal transport