It depends on how it’s done. Each can be done correctly and yield a safe product. Each can also be done incorrectly and, you guessed it, yield an unsafe product. WA state has cracked down a bit there, drawing up regulations and such, resulting in many dispensaries no longer carrying certain items as they cannot guarantee that their supply of said goods was manufactured within the parameters set by regulation. However, those that make medibles as a primary business have generally considered it a worthwhile investment to upgrade their operation to fit regulation, so at least in WA state, medibles are safe.
Like @Coloma, I prefer just lighting up a little flower rather than dealing with waxes, shatters, oils, or anything like that though.