Suppose $X$ is a smooth projective variety defined over a number field $K$, then the etale cohomology $H^i_{et}(X,\mathbb{Q}_\ell)$ defines a continuous representation of the absolute Galois group $\text{Gal}(\overline{K}/K)$. Suppose that for every good prime $\mathfrak{p}$ of $K$, the characteristic polynomial of the Frobenius $F_{\mathfrak{p}}$ factors into \begin{equation} P_{\mathfrak{p}}(T)=\text{Det}(1-F_{\mathfrak{p}}T)|_{H^i_{et}(X,\mathbb{Q}_\ell)}=f_{\mathfrak{p}}(T) \cdot g_{\mathfrak{p}}(T) \end{equation} where the factorization happens in the ring $\mathbb{Z}[T]$. To avoid trivial cases, let us assume $\text{Deg}\,f_{\mathfrak{p}}>0$ and $\text{Deg}\,g_{\mathfrak{p}}>0$.
Question: is $H^i_{et}(X,\mathbb{Q}_\ell)$ the direct sum of two Galois representations, i.e. $M_1 \oplus M_2$, such that the characteristic polynomial of the Frobenius acting on $M_1$ (resp. $M_2$) is $f_{\mathfrak{p}}$ (resp. $g_{\mathfrak{p}}$)?
P.S. I gather if $P_{\mathfrak{p}}(T)$ can be factored further into product of polynomials of lower degree, we should combine correct factors to give the right $f_{\mathfrak{p}}$ (resp. $g_{\mathfrak{p}}$).
This is false for simple group theoretical reasons. Suppose that $V$ is an absolutely irreducible representation of a group $G$ which has odd dimension $d$ and which is self-dual up to twist, say $V \simeq V^{\vee} \otimes \chi$. Then $\chi = \psi^2$ is a square (consider determinants), and the characteristic polynomial of an element $g$ always has a factor of the form $(X \pm \psi(g))$.
As an example of Galois representations with this property, $V$ could be $\mathrm{Sym}^2(W)$, where $W = H^1(E,\mathbf{Q}_{\ell})$ for an elliptic curve $E$. Then $V \simeq V^{\vee} \otimes \varepsilon^2$, where $\varepsilon$ is the cyclotomic character. So if Frobenius at $p$ has the characteristic polynomial $x^2 - a_p x + p$ acting on $W$, then on $V$ it will have the characteristic polynomial
$$(x^2 - (a_p^2 - 2p)x + p^2)(x - p),$$
even though (assuming $E$ does not have CM) $V$ will be irreducible. This example certainly occurs inside etale cohomology, since $H^2(E \times E,\mathbf{Q}_{\ell}) = V \oplus \mathbf{Q}_{\ell}(-1)^3.$
Examples like this occur all the time. A single irreducible representation can even "split" on the level of characteristic polynomials into as many different factors as you want; for example $\mathrm{Sym}^{2n}(W)$ and $\mathrm{Sym}^{2n+1}(W)$ with the same $W$ above will exhibit this property where now there are $n+1$ factors.
You don't even need to go to positive dimensions to see this, you can already see it in dimension zero. Let $f(x) \in \mathbf{Q}[x]$ be any degree four separable polynomial with Galois group $A_4$ ($S_4$ would work almost exactly the same). If $X$ is the underlying set of four points, then
$$H^0(X,\mathbf{Q}_{\ell}) = V_{\ell} \oplus \mathbf{Q}_{\ell},$$
where $V_{\ell} = V \otimes \mathbf{Q}_{\ell}$ is the unique $3$-dimensional irreducible representation of $A_4$, which is also defined over $\mathbf{Q}$. Even though there are only two irreducible factors, the characteristic polynomial of Frobenius will always look like $(X-1)^2 P_g(X)$ for some quadratic $P_g(X)$ depending only in the image of $g$.