Polynomial matrix equality and controllability
Given that $X_0(s)$, $X(s)$ and $U(s)$ are polynomials, by collecting terms containing the same power of $s$ one can write the initial equation also as
\begin{align} - \begin{bmatrix} A & B \end{bmatrix} y_0 &= v_0, \tag{1a} \\ \begin{bmatrix} I & 0 \end{bmatrix} y_{i-1} - \begin{bmatrix} A & B \end{bmatrix} y_{i} &= v_i,\ \forall\,i=1,\dots,k, \tag{1b} \\ \begin{bmatrix} I & 0 \end{bmatrix} y_k &= 0, \tag{1c} \end{align}
with $k \leq n-1$, $v_i \in\mathbb{R}^n$, $y_i \in\mathbb{R}^{n+m}$ and
\begin{align} X_0(s) &= \sum_{i=0}^k v_i\,s^i, \tag{2a} \\ \begin{bmatrix} X(s) \\ U(s) \end{bmatrix} &= \sum_{i=0}^k y_i\,s^i. \tag{2b} \end{align}
From now on I will use $y^x_i$ and $y^u_i$ to denote the components of $y_i$ associated with $X(s)$ and $U(s)$ respectively. Solving $(1c)$ yields $y^x_k = 0$, substituting this in $(1b)$ and solving it yields the following expression for each $y^x_{i-1}$
$$ y^x_{i-1} = v_i + A\,y^x_i + B\,y^u_i,\ \forall\,i=1,\dots,k, \tag{3} $$
where initially each $y^u_i$ can be chosen to be anything. However, these choices get constrained when one also wants to satisfy $(1a)$. Namely, when substituting each expression for $y^x_i$ in $(1a)$ yields
$$ \sum_{i=0}^k A^i B\,y^u_i = \underbrace{-\sum_{i=0}^k A^i v_i}_{r}, \tag{4} $$
which is equivalent to driving the discrete time system associated with $(A,B)$ from the origin to $r$ in $k+1$ time steps. It can be noted that if the polynomial order of $X_0(s)$ has $k < n-1$ (i.e. $v_k \neq 0$ and $v_i = 0,\ \forall\,i > k$) it might not be possible to drive such system to $r$ in $k+1$ steps. However, iff $(A,B)$ is controllable it should always be possible to drive the system to $r$ in $n$ steps, thus $k = n-1$.