Let $(M,g)$ be an analytic Riemannian manifold and $X$ be an analytic vector field on $M$. Can we always have a volume form $\Omega$ such that $\operatorname{Div}_{\Omega} X$ is a harmonic function with respect to the Riemannian metric $g$? What about the particular case $E^n$ the standard Riemannian structure on $\mathbb{R}^n$? We do not require any compatibility or relation between the metric $g$ and volume form $\Omega$.
To have such a compatibility we may modify the question to have a similar question as follows:
Let $X$ be an analytic vector field on a manifold $M$. Is there a Riemannian metric $g$ on $M$ with associated volume form $\Omega_g$ such that the divergence of $X$ with respect to $\Omega_g$ is a harmonic function?
Added: Regarding the first question in dimension 1, assume that $X$ is a vector field on the real line with the usual metric. The Harmonic functions in this setting are just affine linear maps. If we multiply the standard volumeform $\Omega=dx$ by a non vanishing function $f$ then the question is equivalent to find a function $f$ such that $fX'+f'X$ would be a linear map. So $fX$ must be a quadratic map. So this gives a restriction on the dynamic: The vector field $X$ can not have more than 2 simple singularities. So this is possiby a promising simple case which can motivate some non trivial and possibly interesting dynamical obstruction for existence of a volume form for which the divergence of $X$ would be a harmonic map. On the other hand if a smooth vector field $X$ on the real line has at most 2 singularities which are of simple type, say at $a$, $b$, then we may put $f=\frac{(x-a)(x-b)}{X}$. Then $fX$ is a quadratic map.So the answer is affirmative in 1 dimensional case: We can have a volume form with that property if the vector field has at most two equilibrium points. So we hope that the Harmonic requirement of this question generates interesting and non trivial dynamical obstruction. For instance what would be the obstruction in dimension 2?
It seems that the quantity and the number of dynamical objects come to play.
For some other kind of dynamical obstructions please see the following my past post:
Elliptic operators corresponds to non vanishing vector fields