The main difference between the two cases you bring up is that the flux is zero through a closed surface like a cylinder since what comes in must come out in a uniform field, adding up to no flux overall. The answer is different for a surface that is not closed such as a sheet of paper or a hemisphere, since what goes through the surface never reemerges through "the other side," adding up to nonzero flux.
Let the radius of the hemisphere be $R$, and assume that it sits upon the top-half of the $x,y$-plane in $3D$ space. Suppose that the uniform field $\vec E$ points upwards in the $z$-direction. Then, the flux through the hemisphere is exactly the same as the flux through the "opening" of the hemisphere, that is the disk of radius $R$ sitting in the $x,y$-plane, since what comes in through that disk must go through the hemisphere. Hence the flux through the hemisphere $\phi_H$ is the same as the flux through the disk $\phi_D$ of area $A$, which is
$$
\phi_D = \vec E\cdot \vec A = E\cdot(\pi R^2).
$$
In general, to determine the flux $\phi$ through a surface $S$ with a nonuniform field, we employ a so-called vector surface integral:
$$
\phi = \iint_S \vec E\cdot d\vec S.
$$
It's something to keep in mind.
Just something else to add to the already complete discussion, note that the flux through the closed surface that is the disk plus the hemisphere is zero. This is always true for closed surfaces in uniform fields. In addition, what comes in through one surface exits through the other. In the case of the closed surface that is the disk plus the hemisphere, the flux $\phi$ is
$$
0 = \phi = \phi_D + \phi_H
$$
so $\phi_D = -\phi_H$, which makes sense since the flux comes "in" through the disk, and leaves, or "enters negatively" (it's a ridiculous way of putting it, I'm aware) through the hemisphere. This is because $\phi_H$ is actually negative, indicating that there is a net flux out of the surface through the hemisphere. So the positive flux $\phi_D$ through the disk is the same as the negative of the negative flux $\phi_H$ through the hemisphere. In other words,
what comes in must come out.
The statements.
Consider an electric field along the x axis that varies as follows E(x,y,z) = K/(x^2)
and
assume the field vector to be along the positive direction of the X axis, the field lines are parallel and equally spaced, assumed to come from a very large distance
cannot be simultaneously true.
In effect you have proved that with your evaluation of the electric flux through the opposite faces of a cube and showing it to be different.
If the electric field lines are parallel then the electric field is uniform and hence cannot depend on position $x$.
Best Answer
Imagine that your cube is just to the right of a point charge. The field lines from that charge are not parallel, they diverge. So some of them exit the cube through the top, bottom, front, and back faces. The total flux entering the left face is equal to the sum of the fluxes leaving through the other 5 faces.
Or perhaps you are thinking of field lines that are parallel, but decreasing in magnitude from left to right, say $E(r) = \hat{x}*(\textrm{some decreasing function of x})$. What your argument shows is that this is not a physically allowed field; it is not a solution of Maxwell's equations for a charge-free region of space.