From the given difference equation, nothing can be said about linearity or time-invariance. Note that the difference equation (DE) doesn't even uniquely specify the output for a given input $x[n]$. To see this, assume that $y_1[n]$ is a solution to the DE. Let $y_h[n]$ be a solution to the corresponding homogeneous equation
$$y[n]+2y[n-1]+y[n-2]=0\tag{1}$$
Then any sequence $y_2[n]=y_1[n]+y_h[n]$ must also be a solution to the original DE. Note that if $y_h[n]\neq 0$, the corresponding system is neither linear nor time-invariant because that part of the output signal does not depend on the input $x[n]$. So no matter if you shift the input signal, or if you multiply it with a constant, that term remains unchanged.
In order to uniquely specify $y[n]$ for a given input $x[n]$, we need auxiliary conditions. There are several options, but the auxiliary conditions that make sure that the system described by the DE is linear and time-invariant (and causal) are initial rest conditions. If we assume that $x[n]=0$ for $n<0$, then the initial rest conditions are $y[-1]=y[-2]=\ldots=0$. This makes sure that $y_h[n]=0$ for $n\ge 0$, and consequently, the output $y[n]$ contains no term that is independent of the input $x[n]$.
A system described by a linear DE with constant coefficients (such as the one in your question) describes a linear and time-invariant (and causal) system only in combination with the aforementioned initial rest conditions.