I know there are many different types of headphones and IEMs but I'd like learn some general insight as an only-headphone user so far. At the same price range, which one is expected to sound better: a closed back headphone or an IEM? $1000 headphone vs $1000 IEM for example
Once you're in that high a price range, I would be mad if anything I bought didn't sound good ; )
In terms of overall value, I think the big difference between full-size headphones and IEMs is at the low end. (Like, under $100) In part just because at those price points, materials, packaging, and shipping is going to make up a greater percentage of the cost.
There are things that it's going to be easier for headphones to do well. A really obvious example is, it's much easier to have a nice open soundstage, if that's your cup of tea, on an open-back headphone than it is on an IEM. (Although nice ear
buds are surprisingly competitive here.) But by the same token, it's a lot easier to get good isolation with IEMs.
I think there are also different common failure modes for bad designs. Like, many IEMs use multiple drivers, and poorly designed multi-driver implementations will not sound coherent because the drivers aren't working together well. That's a problem that won't see in very many headphones.
But at most price points, you should be able to find either IEMs or headphones that are well-designed, well-built, and suit your tastes, if you shop around and read enough reviews. Also don't assume that your enjoyment will scale with price; the pair of headphones I use the most (Modhouse Argon) are not my poshest set (HD800), and similarly with IEMs (Advanced GT3 Superbass vs. Audeze iSine). But I like all four of those and which one I use will depend a lot more on whether I need isolation and how hot it is, or what kind of music I happen to be listening to, than which one is the "best."