After reading various evaluations of the Gaussian integral $\int_\mathbb Re^{-(x+a)^2}\,dx$, I considered curiously a generalization:$$I(a,b):=\int_\mathbb Re^{-(x^2+ax+b)^2}\,dx$$
I can assert that, without loss of generality, $a$ can be purely imaginary: Just shift $x$ by half of $a$'s real part, then absorb the extra constant into $b$.
So now I redefine $I(a,b)$ as $\int_\mathbb Re^{-(x^2+aix+b)^2}\,dx$, with $b$ possibly still being complex. Now $$\frac\partial{\partial b}I(a,b)=\int_{-\infty}^\infty -2(x^2+aix+b)e^{-(x^2+aix+b)^2}\,dx$$and \begin{align}\frac{\partial^2}{\partial b^2}I(a,b)&=\int_{-\infty}^\infty D_b\Big[-2(x^2+aix+b)e^{-(x^2+aix+b)^2}\Big]\,dx\\[1ex] &=-2\int_{-\infty}^\infty\Big[e^{-(x^2+aix+b)^2}-2(x^2+aix+b)^2e^{-(x^2+aix+b)^2}\Big]\,dx\\[1ex] &=-2I(a,b)+2\int_{-\infty}^\infty(x^2+aix+b)\big[x(2x+ai)+aix+2b\big]e^{-(x^2+aix+b)^2}\,dx\\[1ex] &=-2I(a,b)-\Big[x\left.e^{-(x^2+aix+b)^2}\right\vert_{-\infty}^\infty-\int_{-\infty}^\infty e^{-(x^2+aix+b)^2}\,dx\Big]\\[1ex] &\quad+ai\int_{-\infty}^\infty(2x+ai+\tfrac{4b}{ai}-ai)(x^2+aix+b)e^{-(x^2+aix+b)^2}\,dx\\[1ex] &=-I(a,b)-\tfrac{ai}2e^{-(x^2+aix+b)^2}\Big\vert_{-\infty}^\infty+(4b+a^2)\cdot-\frac12\frac\partial{\partial b}I(a,b) \end{align} (WolframAlpha gives an answer with exponentials, a generalized Hermite polynomial, and a modified Bessel of the first kind)
Now I want to determine the arbitrary constants from WolframAlpha's solution. I have $$I(a,0)=\int_{-\infty}^\infty e^{-(x^2+aix)^2}\,dx$$$$D_{b=0}[I(a,b)]=-2\int_{-\infty}^\infty(x^2+aix)e^{-(x^2+aix)^2}\,dx$$$$D_{b=0}^2[I(a,b)]=-I(a,0)+a^2\int_{-\infty}^\infty(x^2+aix)e^{-(x^2+aix)^2}\,dx$$and \begin{align}I'(a,0)&=\int_{-\infty}^\infty-2(x^2+aix)\cdot ixe^{-(x^2+aix)^2}\,dx\\[1ex] &=i\int_{-\infty}^\infty(x^2+aix)(-2x-ai+ai)e^{-(x^2+aix)^2}\,dx\\[1ex] &=\frac i2e^{-(x^2+aix)^2}\Big\vert_{-\infty}^\infty-a\int_{-\infty}^\infty(x^2+aix)e^{-(x^2+aix)^2}\,dx,\\[8ex] I''(a,0)&=-\int_{-\infty}^\infty(x^2+aix)e^{-(x^2+aix)^2}\,dx-a\int_{-\infty}^\infty ixe^{-(x^2+aix)^2}\,dx\\[1ex] &\quad-a\int_{-\infty}^\infty(x^2+aix)\cdot-2(x^2+aix)ixe^{-(x^2+aix)^2}\,dx\\[3ex] &=\frac{I'(a,0)}a-a\int_{-\infty}^\infty ixe^{-(x^2+aix)^2}\,dx\\[1ex] &\quad-\frac{ai}2\int_{-\infty}^\infty(x^2+aix)\cdot-2(x^2+aix)(2x+ai-ai)e^{-(x^2+aix)^2}\,dx\\[3ex] &=\frac{I'(a,0)}a-a\int_{-\infty}^\infty ixe^{-(x^2+aix)^2}\,dx\\[1ex] &\quad-\frac{ai}2(x^2+aix)e^{-(x^2+aix)^2}\Big\vert_{-\infty}^\infty+\frac{ai}2\int_{-\infty}^\infty(2x+ai)e^{-(x^2+aix)^2}\,dx\\[1ex] &\quad+a^2\int_{-\infty}^\infty(x^2+aix)^2e^{-(x^2+aix)^2}\,dx\\[3ex] &=\frac{I'(a,0)}a-\frac{a^2}2I(a,0)+a^2\int_{-\infty}^\infty(x^2+aix)\big[x(x+\tfrac{ai}2)+\tfrac{aix}2\big]e^{-(x^2+aix)^2}\,dx\\[3ex] &=\frac{I'(a,0)}a-\frac{a^2}2I(a,0)-\frac{a^2}4xe^{-(x^2+aix)^2}\Big\vert_{-\infty}^\infty+\frac{a^2}4\int_{-\infty}^\infty e^{-(x^2+aix)^2}\,dx\\[1ex] &\quad+\frac{a^3i}4\int_{-\infty}^\infty(x^2+aix)\big[2x+ai-ai\big]e^{-(x^2+aix)^2}\,dx\\[3ex] &=\frac{I'(a,0)}a-\frac{a^2}4I(a,0)-\frac{a^3i}8e^{-(x^2+aix)^2}\Big\vert_{-\infty}^\infty+\frac{a^4}4\int_{-\infty}^\infty(x^2+aix)e^{-(x^2+aix)^2}\,dx\\[3ex] &=\left(\frac1a-\frac{a^3}4\right)I'(a,0)-\frac{a^2}4I(a,0) \end{align}This equation has only elementary and Bessel functions (per WolframAlpha); the arbitrary constants here are more straightforward.
As far as I can tell, my calculations check out, thus the integral could have a closed form. But I'm exhausted at this point, so I'll leave this problem here for others to check or finish...
Tackling it's been fun for me, though, and I'll get back to it soon :)
Let's tackle this integral without the use of differential equations.
$$\int_{-\infty}^\infty e^{-(x^2+ax+b)^2}\,dx \color{blue}{=}$$
Rewriting:
$$x^2+ax+b=\left(x+\frac{a}{2} \right)^2+b-\frac{a^2}{4}$$
And substituting:
$$y=x+\frac{a}{2}, \qquad c^2=b-\frac{a^2}{4}$$
We have:
$$\color{blue}{=} \int_{-\infty}^\infty e^{-(y^2+c^2)^2}\,dy \color{blue}=2 \int_0^\infty e^{-(y^2+c^2)^2}\,dy =\frac{c}{\sqrt{2}} e^{-\frac{c^4}{2}} K_{\frac{1}{4}} \left(\frac{c^4}{2}\right)$$
The closed form is given by Wolfram Alpha*.
Finally we have:
* On the derivation of the closed form. There are various integral representations of Bessel functions.
For example:
$$K_{\alpha }(x)=\int _{0}^{\infty }e^{-x\cosh t}\cosh \alpha t\,dt$$
With a suitable change of variables we should be able to connect the two integrals to obtain the closed form.
Another way would be to use the ODE method as the OP suggests. Knowing the Bessel equation, we should be able to use the closed form to connect it with the integral in question.
Note, that we only need one variable $c$ to define the integral, as can be seen from above.
$$f(z)= \sqrt{z} e^{-z^2} K_{\frac{1}{4}} (z^2)$$
It satisfies a very simple ODE (we can prove it by differentiating and using the properties of Bessel function):
$$f''(z)+4z f'(z)+2 f(z)=0 \tag{1}$$
From the closed form we have above, we can see:
$$z=\frac{c^2}{\sqrt{2}}$$
And:
$$\int_{-\infty}^\infty e^{-(y^2+c^2)^2}\,dy=\int_{-\infty}^\infty e^{-(y^2+\sqrt{2} z)^2}\,dy= \frac{1}{\sqrt[4]{2}} f(z) $$
To prove this we need to show that the following function satisfies (1):
$$\sqrt[4]{2} \int_{-\infty}^\infty e^{-(y^2+\sqrt{2} z)^2}\,dy=\int_{-\infty}^\infty e^{-2(t^2+z)^2}\,dt$$
It's quite simple to prove. By differentiating under the integral sign and simplification we have:
$$f''(z)+4z f'(z)+2 f(z)=2\int_{-\infty}^\infty \left(8t^2(t^2+z)-1 \right) e^{-2(t^2+z)^2}\,dt$$
Using integration by parts with $u=t$ and $v=e^{-2(t^2+z)^2}$ we can see that:
$$\int_{-\infty}^\infty 8t^2(t^2+z) e^{-2(t^2+z)^2}\,dt=\int_{-\infty}^\infty e^{-2(t^2+z)^2}\,dt$$