How can chemical energy be stored in chemical things like candle wax, gasoline,...?
Yes, energy isn't a "substance" it is the ability to do work. But chemicals can still store it. 

The key to understanding how is the relative amount of energy in different chemicals. Some chemical reactions release heat because the products of the reaction are lower energy than the chemicals that react (reactions are a bit more complicated than this in reality and some are driven by changes in entropy but that isn't important for understanding simple reactions). A candle, for example, consists of a mixture of long chain hydrocarbons with a formula approximating CH2. A candle will burn in air (reacting with molecules of oxygen) to give a mixture of CO2 and H2O. This reactions releases heat (simplifying slightly) because the bonds making up the products have lower energies than the bonds making up the candle wax.

This is why we can say that chemicals "store" energy. But we should always be careful to specify the reaction involved as chemical energy is stored relative to the possible products from a reaction not in some absolute sense.