This is only a partial answer, but I hope it provides the start to a possible way to solve the problem. As already noted in the question, the $2$ polynomial factors must each be $7$ times a square. In particular,
$$x^3 - x + 1 = 7w^2 \tag{1}\label{eq1}$$
$$x^2 + x + 1 = 7y^2 \tag{2}\label{eq2}$$
for some positive integers $w$ and $y$. The case where $w = y$ has been discussed in the answer by Martin Hansen. Note \eqref{eq2} can be made into the generic form $ax^2 + bxy + cy^2 + dx + ey + f = 0$ by moving the $7y^2$ to the left. Plugging the appropriate coefficients into Generic two integer variable equation solver gives the base positive solution of $x = 2$ and $y = 1$, with the recursion formulas of
$$x_{n+1} = 127 x_n + 336 y_n + 63 \tag{3}\label{eq3}$$
$$y_{n+1} = 48 x_n + 127 y_n + 24 \tag{4}\label{eq4}$$
and also:
$$x_{n+1} = 127 x_n - 336 y_n + 63 \tag{5}\label{eq5}$$
$$y_{n+1} = -48 x_n + 127 y_n - 24 \tag{6}\label{eq6}$$
If you're unsure or concerned that these are all possible solutions, then another approach is to note that \eqref{eq2} can also be treated as a quadratic equation in $x$, so the determinant must be a perfect square. In particular, this means that
$$1 - 4\left(1 - 7y^2\right) = a^2 \; \Rightarrow \; a^2 - 28y^2 = -3 \tag{7}\label{eq7}$$
for some positive integer $a$. According to AoPS Online's Pell equation, this is a Pell-like equation because it's of the form $x^2 - Dy^2 = k$. Regarding solving it, including determining what are all possible solutions, this is asked & with several good answers given in MSE's Does the Pell-like equation $X^2-dY^2=k$ have a simple recursion like $X^2-dY^2=1$?. Also, using Generic two integer variable equation solver again now gives the base positive solution of $x = 5$ and $y = 1$, with the recursion formulas of
$$x_{n+1} = 127 x_n + 672 y_n \tag{8}\label{eq8}$$
$$y_{n+1} = 24 x_n + 127 y_n \tag{9}\label{eq9}$$
and also:
$$x_{n+1} = 127 x_n - 672 y_n \tag{10}\label{eq10}$$
$$y_{n+1} = -24 x_n + 127 y_n \tag{11}\label{eq11}$$
Using either method, you now have a relatively small set of possible solutions to check by using the resulting values of $x$ in \eqref{eq1} to determine if the resulting $w$ is an integer. Unfortunately, I don't know if there's any analytic way to check for there being any solutions, much less the least one greater than $w = 1$ if any do exist.
Note you could also consider \eqref{eq1} to be a cubic equation in $x$ and then determine what conditions are required for an integral root, and what restrictions this imposes on $w$. However, I haven't tried this yet, so I don't know offhand if it'll help or not.