Yes, for any closed Gaussian surface (including irregular surfaces), this law holds.
But we consider only symmetrical surfaces (sphere, cylinder, etc.) in academics as it is easy for performing the integration.
Let us consider the example which you have given:
Black dot represents a point charge.
Here, in order to find the net flux through the surface you must integrate each
E.dA, which is not so easy. The advantage with symmetry is that E is always constant, and dA is always perpendicular to the surface so that you may integrate easily. Even in this case, if you integrate E.dA, you will end up with the same result.
Gauss law even applies for irregular surfaces :
The only problem is to integrate. You would have the same result.
How to think without mathematics :
As we know, flux is the measure of number of lines of electric field passing through the Gaussian surface. Even if you move the charge anywhere within the surface, the number of field lines won't change, right?
All the Gauss laws(of electrostatics, magnetism, gravitation), field vectors, inverse square laws can be derived from the GAUSS LAW OF DIVERGENCE.
It's so exciting!!!
When using the Gauss formula the q is not the charge distributed on the surface, it is the charge enclosed by your Gaussian sphere. Inside of the sphere the charges are distributed evenly throughout the volume not the surface. This means when considering the inside of the insulator, you need to consider how much volume you have enclosed with your Gaussian sphere and then how much charge is inside that volume using the charge distribution.
Best Answer
The issue with doing this is that $$\oint\mathbf{E}\cdot d\mathbf{A}= AE$$ only holds when $E=|\mathbf{E}|$ is constant on the surface, and is always orthogonal to the surface element $d\mathbf{A}$, so that $\mathbf{E}\cdot d\mathbf{A}$ is constant. For example, if your charge is external to the sphere on which you are integrating, the electric field is almost never perpendicular to $d\mathbf{A}$, changes in magnitude all the time, and more importantly it is sometimes opposite in direction to $d\mathbf{A}$. The net result is that the continuous sum of all the $\mathbf{E}\cdot d\mathbf{A}$ will have positive and negative terms and we end up with an integral of zero.