No, in-wall speakers are not as good as comparably-priced free-standing speakers.
You’ve heard right that the speaker cabinet plays in important role in a speaker’s design, specifically the cabinet’s rigidity. If the cabinet is not rigid enough if will resonate at certain frequencies (i.e. the ones that “exite” that particular cabinet), and the sound quality will be colored at those frequencies.
As you can surely imagine, sheetrock does not exactly make for a rigid enclosure. These issues can be overcome with proper design, but that comes at a price. Take a given good-sounding normal speaker, an in-wall of comparable sound quality will probably cost twice as much, if not more.
And yes in-ceiling is generally a bad idea, especially for the front three speakers. However, they can work okay for the rear speakers, if they are situated reasonably close to the seating.
One thing to keep in mind with in-wall speakers: You better get it right the first time, because there is no re-arranging the room or “tweaking” their respective locations once they’re in (e.g. higher or lower, further apart or closer together).
Regards,
Wayne A. Pflughaupt