Pablo D. Sender
Most of Gnostic teachers spoke about a flawed creator, the Demiurgos, and the lower worlds as a flawed creation, an error that could have been avoided. It is also true that Plotinus criticized the Gnostic teachings on that very point, saying that everything in the universe was created according to a universal Law and that creation has a purpose.
Many theosophists adopted the Neo-Platonic point of view instead of the Gnostic one, since HPB, her Masters and later Theosophists also taught that the Universe is ruled by immutable laws, order, and harmony. In fact, in the Key to Theosophy H. P. Blavatsky (HPB) calls the Theosophical Society “its [the Neo-Platonic School] modern successor”.  Let us then examine briefly some of HPB’s teachings about the subject.
i) The Demiurgos
Although she frequently used that term for the “creator” of the lower worlds, she did not refer to him as a flawed god. She says:
But that Demiurgos is no personal deity,—i.e., an imperfect extra-cosmic god,—but only the aggregate of the Dhyan-Chohans and the other forces. 
ii) Creation is not a mistake
From a theosophical point of view, the lower worlds are not avoidable mistakes but an inherent part of the process of evolution, called the “Cycle of Necessity”, through which the Monads have
. . . to progress on their task of evolution, from which task none of us can be freed, neither by death nor suicide, for each of us have to pass through the “Valley of Thorns” before he emerges into the plains of divine light and rest. 
iii) The imperfection of the lower worlds
It is true that these worlds are imperfect, but it is only because “. . . that which is finite cannot be perfect”.  The theosophical teachings agree with the Gnostics that those worlds were created by lower beings, but they were not “Angels” of an evil nature (Archons). HPB wrote:
. . . there are inferior Beings among those Hosts, but there never were anydevils or ‘disobedient Angels’, for the simple reason that they are all governed by Law”. 
iv) Non-deterministic Law
HPB puts always forward the existence of the Law. However, it does not preclude the process from the possibility of mistakes:
That process is not always perfect; and, however many proofs it may exhibit of a guiding intelligence behind the veil, it still shows gaps and flaws, and even results very often in evident failures. 
However, those “failures” do not involve a moral act but only mean that this “aggregate of forces” is also in process of evolution, and therefore those entities are also “learning”.
There is a certain danger in believing that any system, because under immutable laws, will function in the right way just mechanically, without any effort on the part of humanity, Masters, etc. HPB makes the following interesting statement:
In sober truth, vice and wickedness are an abnormal, unnaturalmanifestation, at this period of our human evolution—at least they ought to be so. 
I think we theosophist should have a sense of urgency and responsibility for human evolution, trusting at the same time in the Universal Mind and Law—two attitudes that may seem paradoxical but are in fact complementary.
Insight, Spring 2007
 Blavatsky, Secret Doctrine, vol. I, pp. 279-80
 Blavatsky, Collected Writings, vol. 14, p. 303
 Blavatsky, SD II, p. 487
 Blavatsky, SD I, p. 280
 Blavatsky, SD II, p. 110