Suppose we have a fixed matrix pair $(A, B)$ with $A \in \mathcal M(n \times n; \mathbb R)$ and $B \in \mathcal M(n \times m; \mathbb R)$ and $1 \le m \le n$. Further assume for any monic polynomial of degree $n$ with real coefficients $p(t) = t^n + \alpha_{n-1} t^{n-1} + \dots + \alpha_1 t + \alpha_0$, there exists some $X \in \mathcal{M}(m \times n; \mathbb R)$ such that $p(t)$ is equal to the characteristic polynomial of $A-BX$, i.e., $p(t) = \det(tI - A+BX)$. (This is actually equivalent to controllability of $(A,B)$ in control theory but irrelevant to this question.) This $X$ is in general not unique and it is easy to see if $B$ does not have full rank we have a lot of freedom to choose such $X$.
My question is whether we can define a continuous section $f : \mathbb{R}^n \to \mathcal{M}(m \times n; \mathbb R)$ by \begin{align*} (\beta_{n-1}, \dots, \beta_0) \mapsto X \end{align*} such that $\det(tI - A + BX) = t^n + \beta_{n-1} t^{n-1} + \dots + \beta_1 t + \beta_0$. In particular, for any fixed $X_0$, can we make $X_0$ in the image of the continuous section, i.e., $X_0 \in f(\mathbb R^n)$ for some well-defined $f$?
I think if we don't have the affine part, i.e., we want a map $g : (\beta_{n-1}, \dots, \beta_0) \mapsto \mathcal M(n \times n; \mathbb R)$, then we can take $g$ to be a map to the companion matrix which is clearly continuous. But it is not clear to me how to construct a continuous section including a fixed matrix $X_0$ in the image even in this simple scenario.