Motivation
$ \newcommand{\proofstart}{\mathbf{Proof.}\blacktriangleleft} \DeclareMathOperator{\Ker}{Ker} \DeclareMathOperator{\lcm}{lcm}
\newcommand{\bm}{\boldsymbol}
\newcommand {\F}{\Bbb F} $
I was doing a problem and I need the claim in the OP, so i tried to prove this. My reference used the fact that $\F$ always have a field extension which is algebraic closed, but I have not learned field theory systematically, so I try to use the tools only from basic undergrad math and here is my proof only within the range of linear algebra and the theory of univariate polynomial ring over a field $\F$.
The proof
$\proofstart$ We first prove that if $m = p^r$ where $p\in \F[x]$ is irreducible over $\F$, then $\chi= p^n$ for some $n\geqslant r$. By Cayley-Hamilton theorem, $m \mid \chi$. Thus $\chi = p^n g$ for some $n\geqslant r$. If $\deg(g)>0$ and $p \nmid g$ then $V = \Ker(\chi(\mathcal T)) = \Ker(p(\mathcal T)^n) \oplus \Ker(g(\mathcal T))$ by the fact #2. Let these subspaces be $V_1,V_2$ respectively, then $\mathcal T|_{V_1}$ is annihilated by $p^n$, $\mathcal T|_{V_2}$ is annihilated by $g$. Thus the minimal polynomial of $\mathcal T|_{V_1}$ is $p^k$ for some $k\leqslant n$, and that of $\mathcal T|_{V_2}$ is some $d$ that divides $g$. Thus $m = p^k d$ by the fact #4. Now by the fact #1, $m=p^n$ is the uniqueness decomposition, so we have $p \mid d$, then $p\mid g$ which is a contradiction. Therefore $\deg(g) =0$. Since $m, \chi$ are both monic, $g = 1$, then $\chi = p^n$.
Now for the general case, suppose $\chi =\prod _1^s p_j^{n_j}$ where $p_j$ are distinct irreducible monic polynomials. Then by the C-H theorem and the fact #3
$$
V = \Ker(\chi(\mathcal T)) = \bigoplus_1^s \Ker(p_j(\mathcal T)^{n_j}).
$$
Let $V_j = \Ker(p_j(\mathcal T)^{n_j})$. Then $V_j$ is invariant under $\mathcal T$. Then $m_j$, the minimal polynomial of $\mathcal T|_{V_j}$ is $p_j^{r_j}$ for some $r_j \leqslant n_j$, since $p_j$ is irreducible and $m_j \mid p_j^{n_j}$. Thus by #4, the minimal polynomial $m$ of $\mathcal T$ is $m = \lcm(p_j^{r_j})_1^s = \prod_1^s p_j^{r_j}$.
For the converse, suppose $m = \prod_1^s p_j^{r_j}$, then by the fact #3
$$
V = \Ker(m(\mathcal T)) = \bigoplus_1^s \Ker(p_j(\mathcal T)^{r_j}).
$$
Let $W_j = \Ker(p_j(\mathcal T)^{r_j})$, then $W_j$ is invariant under $\mathcal T$. Then the minimal polynomial of $\mathcal T|_{W_j}$ is $\mu_j = p_j^{k_j}$ for some $k_j \leqslant r_j$. Now apply the claim at the very beginning to $\mathcal T|_{W_j}$ and $\mu_j$, we have that the characteristic polynomial $\chi_j$ of $\mathcal T|_{W_j}$ is $\chi_j = p_j^{n_j}$ for some $n_j \geqslant k_j$. Noe use the fact #5, we have $\chi =\prod_1^s p_j^{n_j}$.
Conclusively, $\chi$ and $m$ always share the same irreducible factors. $\blacktriangleright$
Appendices: the fact I used
First we should admit the following fact:
1.[Uniqueness Decomposition of Polynomials] In $\Bbb F [x]$ where $\Bbb F $ is a field, every $f \in \Bbb F[x]$ of degree $\geqslant 1$ could be uniquely decomposed as a product of finitely many irreducible polynomials in $\F[x]$.
Now we need a decomposition theorem.
2.Suppose $f=gh$ where $f ,g,h \in \F[x]$ and $g,h$ are coprime and of degrees both $>0$, then given an $\F$-linear space $V$, for all $\mathcal T\in \mathcal L(V) [=\mathrm {End}(V)]$, $$ \Ker(f(\mathcal T)) = \Ker(g(\mathcal T)) \bigoplus \Ker(h(\mathcal T)). $$
$\proofstart$ Clearly $\Ker(g(\mathcal T )), \Ker(h(\mathcal T)) \subseteq \Ker(f(\mathcal T ))$, hence $\Ker(g(\mathcal T)) + \Ker(h(\mathcal T)) \subseteq \Ker(f(\mathcal T))$. For the converse, since $g,h$ are coprime, there exists $u,v\in \F[x]$ s.t. $ug+vh =1$. Thus $u(\mathcal T)g(\mathcal T) + v(\mathcal T)h(\mathcal T) = \mathcal I$. Then for every $\alpha \in \Ker(f(\mathcal T))$,
$$
\alpha = u(\mathcal T)g(\mathcal T)\alpha + v(\mathcal T)h(\mathcal T)\alpha.
$$
Since $u(\mathcal T) g (\mathcal T)\alpha \in \Ker (h(\mathcal T))$, $v(\mathcal T)h(\mathcal T)\alpha \in \Ker(g(\mathcal T))$, we have
$$
\Ker(f(\mathcal T)) = \Ker(g(\mathcal T)) + \Ker(h(\mathcal T)).
$$
To prove the sum is direct, suppose $g(\mathcal T)\beta = h(\mathcal T)\beta = 0$, then
$$
0 = u(\mathcal T) g(\mathcal T) \beta + v(\mathcal T)h(\mathcal T)\beta = \beta,
$$
thus the sum is direct. $\blacktriangleright$
This could be generalized as:
3.Suppose $f\in \F[x]$ has a decomposition $f = \prod_1^s f_j$ where $(f_j)$ are pairwise coprime, then for $\mathcal T\in \mathcal L(V)$, $$ \Ker(f(\mathcal T)) = \bigoplus_1^s \Ker(f_j (\mathcal T)).$$
This could be proved by induction on $s$.
Now for the minimal polynomial, we have
4.Suppose $V$ is an $\F$-linear space, $\mathcal T \in \mathcal L(V)$. If $V$ could be decomposed as $V = \bigoplus_1^s V_j$ where every $V_j$ is invariant under $\mathcal T$, then the minimal polynomial $m\in \F[x]$ of $\mathcal T$ and the minimal polynomials $m_j$ of $\mathcal T|_{V_j}$ satisfy
$$
m = \mathrm {lcm}(m_1, \dots, m_s).
$$
$\proofstart$ Suppose $p(\mathcal T) = \mathcal O$ for $p \in \F[x]$. Then $p(\mathcal T|_{V_j}) = \mathcal O$ as well. Therefore $m_j\mid p$ for all $j$, thus $g = \lcm(m_j)_1^s$ satisfies $g \mid p$. Specifically $m(\mathcal T) = \mathcal O$, so $g \mid m$. Let $g = m_j d_j$ for $j =1, \dots, s$. By the direct sum expression, each $\alpha$ is actually $\alpha = \sum_1^s \alpha_j$ for $\alpha_j \in V_j$. Thus
$$
g(\mathcal T)\alpha = \sum_1^s(d_j \cdot m_j)(\mathcal T) \alpha_j = \sum_1^s (d_j\cdot m_j) (\mathcal T|_{V_j}) \alpha_j =0,
$$
i.e. $g(\mathcal T) = \mathcal O$. Thus $m \mid g$ by the minimal property of $m$. Since $m,g$ are monic, $m =g.\blacktriangleright$
5.Under the same assumption of #4, suppose $\chi_j$ is the characteristic polynomial of $\mathcal T|_{V_j}$, then $\chi = \prod_1^s \chi_j$.
$\proofstart$ By the decomposition of $V$, we could find a basis of $V$ under which $\mathcal T$ has a block diagonal matrix $\bm T =\mathrm {diag}(\bm T_1, \dots, \bm T_s)$, where $\bm T_j$ is a $\dim(V_j) \times \dim(V_j)$ matrix over $\F$. Then we actually have
$$
\chi(x) = \det (x\bm I - \bm T) = \prod_1^s (x \bm I - \bm T_j) = \prod_1^s \chi_j(x),
$$
as desired. $\blacktriangleright$