I watched a video in which the lecturer considers some compact metric space $Q,d$ and, more specifically, the space $\mathcal{P}(Q)$ of probability measures on $Q$ (thus, we implicitly consider the measurable space $Q,\mathcal{B}$, where $\mathcal{B}$ denotes the Borel $\sigma$-algebra on $Q$).
In the sequel, I say "random variable" for any measurable map from a given probability space to some metric space (in particular, "random variable" does not especially mean a "measurable map from a probability space to $\mathbb{R}$").
Now, let $(\Omega,\Sigma,\mathbb{P})$ be a probability space. He says that, in general, for a given $m\in\mathcal{P}(Q)$, the existence of a random variable $X:\Omega\to Q$ such that $\text{law}(X)=m$ is not ensured and requires specific conditions on $(\Omega,\Sigma)$ for this existence to hold.
I perfectly understand the issue but I didn't manage to find reference works on this. Could someone directs me to some book discussing this kind of topics, please ?