As others mentioned, there are no continuous $p,q$ that are defined everywhere with the required properties. Indeed, plugging in $y(x)=x^3$, one obtains
$$\forall x\in\mathbb{R}: 0 = 6x+3x^2p(x)+x^3q(x) = x(6+3xp(x)+x^2q(x)).$$
Thus
$$\forall x\in\mathbb{R}\setminus\{0\}:0 = 6+3xp(x)+x^2q(x).$$
Say $p,q$ are continuous at $0$. Taking the limit as $x\to 0$ thus gives $0=6$, a contraction.
On the other hand, if the interval of definition is allowed to be a proper subset of $\mathbb{R}$, one can find $p,q$. Indeed, let $a,b\in\mathbb{R}$, $a\neq0$, $D_{a,b} = \mathbb{R}\setminus\{0,-b/a\}$ and define
$$p_{a,b}:D_{a,b}\to\mathbb{R},x\mapsto \dfrac{-4ax-6b}{x(ax+b)},$$
$$q_{a,b}:D_{a,b}\to\mathbb{R},x\mapsto \dfrac{6ax+12b}{x^2(ax+b)}.$$
Then $p_{a,b},q_{a,b}$ are real analytic (see e.g. Is any rational function $R(x)$ a real analytic function in its domain?), and $y(x)=x^3$ is a solution to
$$
y''(x)+p_{a,b}(x)\,y'(x)+q_{a,b}(x)\,y(x)=0, \quad x\in D_{a,b}.
$$
(This can be verified by direct computation; alternatively see https://www.desmos.com/calculator/vbejfaja6l).
More generally one can reason as follows. Let $y:\mathbb{R}\to \mathbb{R}$ be $C^{r+2}$ (i.e. $r+2$ times continuously differentiable). We want to find two functions $p,q$ defined on an open interval that are at least continuous, such that
$$y''+py'+qy=0.$$
Instead consider the possibility of a "higher order integrating factor" $\alpha$; namely $\alpha\in C^2$ such that
$$(\alpha y)'' = 0,$$
that is, there are two numbers $a,b$ such that $\alpha(x) y(x) = ax+b$. When $x$ is not a zero of $y$, we thus would have
$$\alpha(x)=\dfrac{ax+b}{y(x)},$$
so that $\alpha$ is as regular as $y$. Expanding the double derivative one also has, for $x$ such that $y(x)\neq0$ and $x\neq -b/a$,
\begin{align*}
0
&= (\alpha y)''(x)
= \alpha(x) y''(x) + 2\alpha'(x) y'(x)+ \alpha''(x) y(x) \\
&= \alpha(x) \left(y''(x) + \dfrac{2\alpha'(x)}{\alpha(x)} y'(x) + \dfrac{\alpha''(x)}{\alpha(x)} y(x)\right).
\end{align*}
For such $x$, $\alpha(x)\neq 0 $, hence we have:
$$y''(x) + \dfrac{2\alpha'(x)}{\alpha(x)} y'(x) + \dfrac{\alpha''(x)}{\alpha(x)} y(x) = 0, \,\, x\in D_{a,b}=\{y\neq0\}\setminus\{-b/a\}.$$
Defining $p(x)=\dfrac{2\alpha'(x)}{\alpha(x)}$ and $q(x) = \dfrac{\alpha''(x)}{\alpha(x)}$, we have that $p\in C^{r+1}(D_{a,b};\mathbb{R})$ and $q\in C^{r}(D_{a,b};\mathbb{R})$, and
$$y''(x) + p(x) y'(x) + q(x) y(x) = 0, \,\, x\in D_{a,b}.$$
In particular, for any function there is a two parameter family of linear ODEs that the function solves on an open interval. It might be useful to also keep in mind the invariants discussed here: Which analogy between polynomials and differential equations did Rota have in mind in his TEN LESSONS?