Let $(X,d)$ be a metric space and let $\mathcal P(X)$ be the set of all Borel probability measures on $(X,d)$. The Wasserstein distance on $\mathcal P(X)$ is given by $$ W_d(\mu,\bar\mu):=\inf_{M\in C(\mu,\bar\mu)}\int\limits_{X\times X} d(x,y)M(dx\times dy) $$ where $C(\mu,\bar\mu)$ is a set of all measures $M$ whose marginals are $\mu$ and $\bar \mu$. A very much related is the Kantorovich distance on $\mathcal P(X)$ given by $$ K_d(\mu,\bar\mu) := \sup\left\{\int_X f(x)(\mu-\bar\mu)(dx): f\in N(X,d) \right\} $$ where $N(X,d)$ is a set of all real-valued non-expansive maps (i.e. whose Lipschitz constant is $1$).
I wonder about the conditions on $(X,d)$ that are sufficient for the following:
The minimizer for the Wasserstein distance exists. That is, for any $\mu,\bar\mu \in \mathcal P(X)$ there exists $M^*\in C(\mu,\bar\mu)$ such that $$ W_d(\mu,\bar\mu):=\int\limits_{X\times X} d(x,y)M^*(dx\times dy). $$
The duality holds, that is $W_d = K_d$.
I would be interested in seeing precise references as well. As far as I remember, both features are true for compact spaces, but I also wondered about Polish space and Borel spaces (Borel subsets of Polish spaces).
For Polish $X$:
The first of two books is more analysis-oriented, and may be easier to read. The second one is available for download on Villani's page.
I have not seen any studies of this in incomplete spaces. It seems one could pass to completion $\overline{X}$, apply the result, and observe that the optimal measure gives full mass to $X\times X$, because its marginals give full mass to $X$.