The quick answer is: both versions occur, depending on context, but the more basic form is the one without the glottal stop — this is standard in most contexts, and not glaringly weird even in contexts where adding the glottal stop is more standard.
Long answer: There are two separate differences here — the presence/absence of a glottal stop, and the use of syllabic r [ɹ̩] versus schwa+r [əɹ]. These are largely independent, so I’ll take them separately. Like OP I’ll take earn as the example, but this all holds for other words beginning similarly.
The glottal stop is most interesting: It depends on the context around the word earn. The basic pronunciation of the word for most AmE speakers is [ɹ̩n] or [əɹn] (no glottal stop). Most speakers will add a glottal stop (“hard attack”) before it in certain contexts — most commonly when earn follows a word ending with a schwa, or begins a new utterance, or is especially emphasised — and depending on dialect, different speakers may use hard attack in a narrower or wider range of such contexts. alphabet’s answer gives a more detailed and well-referenced discussion of this, so I’ll just illustrate with a few examples:
- “I didn’t earn much there.” — No glottal stop.
- “Does she earn much there?” — No glottal stop.
- “She’s not gonna earn much there.” — Glottal stop for many (?most) speakers, due to preceding schwa.
- “Earning much these days?” — Glottal stop for many (?most) speakers, since it begins a new utterance.
- “They paid him, but he didn’t really earn it!” — Optional glottal stop for many (?most) speakers, if especially emphasising earn.
- “The earnings weren’t great.” — Variable! For most speakers, unreduced the and no glottal stop: [ðɪjəɹnɪŋz]. For some (increasingly many) speakers, reduced the and a glottal stop: [ðəʔəɹnɪŋz].
The version without glottal stop is more basic (“unmarked”, to be more precise), so if in doubt, that’s the safer one to use; omitting the glottal stop where a native speaker would use it is much less noticeable than adding it where a native wouldn’t. (This point is very tricky in ESL teaching, since when a native demonstrates the individual word earn, they’ll usually add the glottal stop, as it’s both emphasised and utterance-initial. It’s the natural pronunciation for the context, but it’s not the standard unmarked pronunciation of the word!)
I’m less sure about the second difference, [ɹ̩] vs [əɹ]. My impression is that both forms are widespread, and the difference is mainly inter-speaker or free variation (not context-dependent for individual speakers), and much less salient to native speakers than the presence/absence of the glottal stop.
(alphabet’s and Peter Shor’s answers each give very good further detail on specific aspects of the issue.)