They have to use the "Create Unit" trigger action. If you preplace the unit or use "Create Unit With Properties," it will die when its energy runs out.
Broodlings created using Create Unit will not expire, unless they are later affected by the Modify Unit Hit Points action. Broodlings created using Create Unit With Properties will expire. There is no way to shorten or lengthen the expiration timer of a Broodling or Hallucinated unit.