I solved the problem.

We can write our PDE as $X(u)=w\cdot u+h$, where $X$ is the vector field $X=\sum_i\lambda_i\cdot x^i\,\partial_{x^i}$. Note that $X$ induces a concept of $\textit{weight}$ of a function: $f$ is homogeneous of weight $w$ if $X(f)=w\cdot f$. In particular, the coordinate $x^i$ is of weight $\lambda_i$ and any monomial $x^m$, where $m=(m_1,\dots,m_n)\in\mathbb{N}^n$ is a multi-index, is homogeneous of weight $|m|=\sum_im_i\,\lambda_i$.

Checking now for formal solutions, we get for $u(x)=\sum_ma_mx^m$ that $X(u)=\sum_m|m|a_m x^m$ that leads to some constraints for coefficients of the Taylor expansion of $h$, so a necessary condition. If this condition is fulfilled, i.e. there is a formal solution, we can reduce our problem to the case when $h$ is flat at $0$. But this always has a solution.

We can reduce to the case when all $\lambda_i\ne 0$ and some of them, say $\lambda_1,\dots,\lambda_k$, are $>0$. Let us consider functions $y_i=(x^i)^{1/w_i}$, $i=1,\dots,k$, and $z_j=(x^j)^{\lambda_1}\cdot(x^1)^{-\lambda_i}$, $j=k+1,\dots,n$. Obviously, $y_i$ are of weight $1$ and $z_j$ are of weight $0$. These functions vanish at $0$ and are generally not coordinates, but as $h$ is flat at $0$, it is also a flat at $0$ smooth function in variables $(y_i,z_j)$. Moreover, in these variables, $X=\sum_iy^i\partial_{y^i}$. Put $$u(y,z)=\left(\sum_i(y^i)^2\right)^{w/2}\cdot u_1(y,z)\,.$$ We have
$$X(u)=w\cdot u+\left(\sum_i(y^i)^2\right)^{w/2}\cdot X(u_1)\,,$$
so that it is enough to find $u_1$ satisfying
$$X(u_1)(y,z)=\left(\sum_i(y^i)^2\right)^{-w/2}\cdot h(y,z)\,.$$
As $h$ is flat at $0$, the right hand side of the above equation is a flat at $0$ smooth function in variables $(y,z)$, say $h_1$. In consequence, we reduced to the equation $\sum_iy^i\cdot\frac{\partial u_1}{\partial {y^i}}(y,z)=h_1(y,z)$.
The function $h$ vanishes at $0$, so it can be written in the form $h_1=\sum_iy^i\cdot g_i$, where $$g_i(y,z)=\int_0^1\frac{\partial h_1}{\partial y^i}(ty,z)\rm d t\,.$$
Now, it is enough to solve the system of differential equations
$\frac{\partial u}{\partial y^i}=g_i$. The integrability condition is
$$\frac{\partial g_i}{\partial y^j}=\frac{\partial g_j}{\partial y^i}\quad\text{for}\quad i\ne j\,,$$
which, due to the form of $g_i$, is clearly satisfied.

The Mellin transformation and Fuchsian type partial differential equations(English), Mathematics and Its Applications, East European Series, 56, Dordrecht-Boston-London: Kluwer Academic Publishers, pp. xiv+223 (1992), ISBN: 0-7923-1683-5, MR1196461, Zbl 0771.35002. $\endgroup$