Western Red Cedar is not particularly expensive if you select 'utility' grade, which will have some knots and density variation, but that is not much of a problem for use in hives. Cedar has two big advantages, it's lightweight, and weather resistant in its natural state.
Deal and Pine are probably half the price of cedar but only if the utility grades are selected, and they can be very knotty and subject to warping, and weather resistance is very low if untreated. So you must add the cost of weatherproofing coatings for a fair comparison.
Birch ply is high quality stuff and very expensive, so is marine ply. Far too good for beehives really, and much heavier than Cedar.
Cheap ply is quite ok as long as the glue is water and boil proof, known as WBP, and the fast grown spruce, or cheap exterior grades are fine for beehives. Significantly heavier than Cedar but only about a quarter of the price and still needs waterproof surface treatments. Plywood is generally dimensionally more stable than Cedar or Pine and is stronger thereby allowing very simple joints.
I have used all of them to construct hives and I consider that plywood gives the most effective use of the money spent if costed over say 5 years. Of course, treated Cedar might last 50 years but is that important ?
I have had no problems with arsenic or formaldehyde with the aforementioned materials, but I do think chip-boards, strand-boards and MDF suffer from irritative toxins.