$\newcommand{\Si}{\Sigma}$
It does not matter whether the random variable (r.v.) $R:=\Phi$ is discrete or continuous or neither; it can be any r.v. whatsoever, with values in any measurable space $(S,\Si)$. Indeed, let $Y$ be any $[K]$-valued r.v. defined on the same probability space as $R$. For each $y\in[K]$, let $g_y\colon S\to\mathbb R$ be a $\Si$-measurable function such that
$$g_y(R):=g_y\circ R=E(I\{Y=y\}|R)[=P(Y=y|R)], \tag{1}
$$
where $I$ denotes the indicator and $E(\cdot|R)$ denotes the conditional expectation given the r.v. $R$. So, for each measurable map $w$ from $S$ to the probability $K$-simplex (say $V_K$),
\begin{align}
E\ell(w(R),Y)&=E\sum_{y\in[K]}\ell(w(R),y)I\{Y=y\} \\
&=\sum_{y\in[K]}E\ell(w(R),y)I\{Y=y\} \\
&=\sum_{y\in[K]}EE(\ell(w(R),y)I\{Y=y\}|R) \\
&=\sum_{y\in[K]}E\ell(w(R),y)E(I\{Y=y\}|R) \\
&=\sum_{y\in[K]}E\ell(w(R),y)g_y(R) \\
&=E\sum_{y\in[K]}\ell(w(R),y)g_y(R) \\
&=\int_S P(R\in dr)\sum_{y\in[K]}\ell(w(r),y)g_y(r) \\
&=-\int_S P(R\in dr)\sum_{y\in[K]}g_y(r)\ln w(r)_y \\
&=-\int_S P(R\in dr)H_r(w(r)),
\end{align}
where
$$H_r(v):=\sum_{y\in[K]}g_y(r)\ln v_y
$$
for $v\in V_K$.
So, the minimization of $E\ell(w(R),Y)$ in all measurable functions $w\colon S\to V_K$ boils down to the maximization, for each $r\in S$, of $H_r(v)$ in $v\in V_K$. We can choose the versions of the conditional expectations $g_1(R),\dots,g_K(R)$ of
$I\{Y=1\},\dots,I\{Y=K\}$ so that these conditional expectations are everywhere nonnegative and sum to $1$. That is, $g_y(r)\ge0$ for all $r\in S$ and $y\in[K]$, and $\sum_{y\in[K]}g_y(r)=1$ for all $r\in S$.

Then it is easy to see that $H_r(v)$ is minimized in $v\in V_K$ if $v_y=g_y(r)$; this is just the nonnegativity of the Kullback-Leibler divergence. That is, the risk $E\ell(w(R),Y)$ is minimized in $w$ if for all $r\in S$ and $y\in[K]$ we have
$$w(r)_y=g_y(r),$$
and $g_y(r)$ could be (generally, only symbolically) written as $P(Y=y|R=r)$ -- cf. (1).