$X$ Polish geodesic implies $(P_2(X), W_2)$ geodesic 
If $X,d$ is a complete and separable space then the space of Borel probability measures with finite second moment on $X$ endowed with the Wasserstein distance $W_2$ is geodesic.

I am looking for a detailed proof of this fact.
 A: EDIT: As pointed out by Tapio Rajala, my proof is wrong without assuming that $X$ is compact. I've added this assumption, which I don't think is necessary, but I am having some trouble seeing how to drop it.

Let $(X,d)$ denote a compact Polish length space and $(Geod(X),d_\infty)$ denote the (compact) Polish space of geodesics in $(X,d)$, equipped with the $\sup$-distance. Now, consider the map
$$
Eval: Geod(X) \to X\times X.
$$
which takes $\gamma\mapsto (\gamma(0),\gamma(1))$ (in this setting, it is standard that all geodesics are assumed to be of unit length, parametrized by constant speed).
Claim 1: The $Eval$ map is continuous. I'll leave this to you to check (its easy).
Claim 2: The $Eval$ map is surjective. This follows because we have assumed that $X$ is a length space, so there is a geodesic between any two points.
Claim 3: The $Eval$ map has compact fibers. This is clear because I've changed the assumption to $X$ closed.
Thus, we may apply measurable selection to $Eval$, per the version of measurable section on Villani (OT: Old and New) p. 92:

A surjective Borel map between Polish spaces with compact fibers admits a Borel right inverse.

In particular, there exists
$$
GeodSel: X\times X \to Geod(X)
$$
so that $Eval(GeodSel(x,y)) = (x,y)$. This is exactly what you would like to use in the proof of the statement you mention in your question. 

I think that the confusion between this question and the one you link to is that you are considering the multiple valued map $S$ from $X\times X$ to $2^{Geod(X)}$. This is your mistake: measurable selection constructs a single valued such $S$. In order to construct such an $S$, you need to look at the evaluation map in the other direction, which is a single valued map.  
A: As already mentioned, an almost complete proof can be found in Ambrosio and Gigli's A user's guide to optimal transport, Theorem 2.10; however, there is a (seemingly) implied claim in the referenced proof which is actually false.
Wrong claim. If $X,Y$ are Polish spaces and $F:X\to\mathcal{P}(Y)$ is a multifunction with closed graph in $X\times Y$ (and $F(x)\neq\emptyset$ for every $x\in X$), then $F$ admits a Borel selection.
This does not hold: we can find a continuous, surjective map $g:Y\to X$ between Polish spaces such that there exists no Borel section $f$ (meaning $f:X\to Y$ with $g\circ f=\operatorname{id}_X$), according to Bogachev's Measure Theory, vol. 2, Theorem 6.9.8, where a section is called a "selection" (I didn't check the proof but the book looks reliable). We can define a multifunction $F$ by $F(x):=g^{-1}(x)$, for $x\in X$. Since $g$ is continuous, its graph is closed in $Y\times X$, and hence also the graph of $F$ is closed in $X\times Y$. However, Borel sections for $g$ are exactly Borel selections for $F$.
On the other hand, in the setting of the optimal transport book, we just need a selection $f$ for which every probability measure $\mu$ on $X$ has a well-defined pushforward $f_*\mu$. Let $\mathcal{A}$ be the $\sigma$-algebra generated by analytic subsets of $X$; recall that it includes the Borel $\sigma$-algebra, and more importantly it is always included in the completion of the Borel $\sigma$-algebra with respect to $\mu$. Let $\mathcal{B}$ be the Borel $\sigma$-algebra of $Y$. It is enough to show the following.
True claim. There exists an $(\mathcal{A},\mathcal{B})$-measurable selection $f$.
This is easy to achieve: write $Y=\bigcup_{i\in\mathbb N}Y_i$, with $Y_i$ closed sets of diameter $\le 1$, then for each $i\in\mathbb N$ write $Y_i=\bigcup_{j\in\mathbb N}Y_{ij}$, with $Y_{ij}$ closed of diameter $\le 1/2$, and so on. Pick $y_i\in Y_i$, $y_{ij}\in Y_{ij}$, and so on.
The set $X_i':=\{x\in X:F(x)\cap Y_i\neq\emptyset\}$ is analytic, since it is the projection of the closed set $\operatorname{graph}(F)\cap (X\times Y_i)\subseteq X\times Y$ on $X$. We then let
$$ X_i:=X_i'\setminus\bigcup_{k<i}X_k' $$
(this set is not guaranteed to be analytic, but certainly $X_i\in\mathcal{A}$) and define
$$ f_0(x):=y_i \quad\text{on }X_i $$
(note that the sets $X_i$ are a partition of $X$). We similarly define $X_{ij}'$ and we build the finer partition
$$ X_{ij}:=X_i\cap\Big(X_{ij}'\setminus\bigcup_{k<j}X_{ik}'\Big), $$
and define
$$ f_1(x):=y_{ij} \quad\text{on }X_{ij}, $$
and so on. We thus obtain a sequence of $(\mathcal{A},\mathcal{B})$-measurable functions $f_n$. Since $d_Y(f_m(x),f_n(x))\le 2^{-\operatorname{min}(m,n)}$, they converge pointwise to a measurable function $f$. We claim that $f$ is a selection.
Indeed, given $x\in X$, take $i$ such that $x\in X_i$; since $F(x)$ intersects $Y_i$, which contains $f_0(x)=y_i$, we have $d_Y(f_0(x),F(x))\le\operatorname{diam}(Y_i)\le 1$. Similarly, $d_Y(f_n(x),F(x))\le 2^{-n}$. In the limit we have $d_Y(f(x),F(x))=0$, which gives $f(x)\in F(x)$ since $F(x)$ is closed.
