I'm looking into cheap materials I can cast candles into, and I'm wondering if recycled HDPE plastic would be a safe mold to cast candles in.
"Safely" can have a lot of meanings, as Chris H mentions in a comment. A mold of paper-thin HDPE could soften and burst, but something more substantial, like a recycled bottle or jug, won't melt from the hot wax and spill wax everywhere, and won't leach harmful chemicals into the wax. So it's safe from that perspective as long as you start with something that was designed to be a container and is substantial enough that it keeps its shape when you handle it. In fact, candle molds are commonly made from HDPE. But there is a catch if by "safely" you mean getting the anticipated outcome.
HDPE softens at a much lower temperature than it melts at. HDPE candle molds typically have thick walls so they are very rigid, and sometimes also have reinforcing shapes on the outside. A thin-walled container, like a recycled bottle, can easily be deformed at room temperature by squeezing it with your fingers or applying a little air pressure. At room temperature, it returns to its manufactured shape when you stop. But if you warm it to the temperature of melted wax, it deforms much more easily and will retain the deformed shape if it cools like that.
If by "recycled HDPE", you mean HDPE you've melted and formed into rigid flat stock, that will work fine if you create a mold from it. If you're referring to using (washed out) bottles or canisters, they are likely to deform if you don't contain the outside. So you could do something like embed the bottle in sand to keep its shape, and then fill it with hot wax and allow it to cool before removing it from the sand.
One thing to be aware of is the potential for the heat to soften and collapse the neck and opening of the bottle, or shrink the unfilled portion. The bottles may become single-use molds that you need to cut away unless you first cut off the top to the desired candle height, and then fill it to the top.