A counterexample for random variable with nonseparable range.

Let $\omega_1$ be the smallest uncountable ordinal. Let $\Omega = [0,\omega_1)$, the set of countable ordinals, with the order topology. Then the Banach space $B = C[0,\omega_1)$ will be used. Note: every real-avalued continuous function on $[0,\omega_1)$ is bounded. Moreover,
$$
\lim_{\alpha \to \omega_1} f(\alpha)
$$
exists for every $f \in B$ and
$\phi : B \to \mathbb R$ defined by
$$
\phi(f) = \lim_{\alpha \to \omega_1} f(\alpha)
$$
is a bounded linear functional.
[The Stone-Cech compactification of $\Omega$ is the one-point compactification of $\Omega$.]

Our measure space is $(\Omega,\mathcal F, \mathbb P)$, where $\mathcal F$ is the countable-cocountable sigma-algebra, and $\mathbb P$ is $0$ on countable sets and $1$ on cocountable sets. Note: if $f \in C[0,\omega_1)$, then the integral is
$$
\int f(\alpha)\;\mathbb P(d\alpha) = \lim_{\alpha \to \omega_1} f(\alpha) = \phi(f) .
$$

Define $F : \Omega \to B$ by $F(\alpha) = \mathbf1_{(\alpha,\omega_1)} $, the indicator function of the interval $(\alpha,\omega_1)$, which is a clopen set.

We will show that that there is no $\mathbb E[F] \in B$ with the property $\mathbb E[R\circ F] = R\big(\mathbb E[F]\big)$ for all bounded linear functionals $R : B \to \mathbb R$. Suppose it does exist.

Fix $\xi \in [0,\omega_1)$. Then $f \mapsto f(\xi)$ is a bounded linear functional, and
$$
F(\alpha)(\xi) = \begin{cases}
1,\quad \alpha < \xi
\\
0,\quad \alpha \ge \xi
\end{cases}
$$
and thus
$$
0 = \lim_{\alpha \to \omega_1} F(\alpha)(\xi) =
\int F(\alpha)(\xi)\;\mathbb P(d\alpha) =
\left(\mathbb E[F]\right)(\xi)
$$
This holds for all $\xi$ so $\mathbb E[F] = \mathbf 0$, the zero element of $B$.

On the other hand $\phi$ defined above is a bounded linear functional, and
$$
\phi(F(\alpha)) = \lim_{\xi \to \omega_1}F(\alpha)(\xi) = 1
$$
for all $\alpha$.

So
$$
\mathbb E[\phi\circ F] =\int\phi(F(\alpha))\;\mathbb P(d\alpha)
=\int 1\;\mathbb P(d\alpha) = 1 .
$$
This is not equal to $\phi\big(\mathbb E[F]\big) = \phi(\mathbf 0) = 0$.

.....

Now I'm wondering if $F$ is Borel.