pedagogue is mostly from French, paediatrics is mostly from Latin
Well, as the OED says, although the word pedagogue comes from Greek if you go back far enough, the immediate sources of the English word are French and Latin. (You can see the French influence on the spelling in the use of -gue to represent a hard g sound.) In fact, with the exception of the acute accent, the French word pédagogue is spelled identically to the English word pedagogue.
This suggests to me that when the word entered Middle English, it was basically a borrowing from French, and so started out with the French spelling. Later on, as it became more established as an English word, the French spelling became less relevant, but the Latin/Greek origin was still obvious. So people began using the ae spelling that more closely corresponds to the Greek etymology.
The word p(a)ediatrics is more recent and also more clearly derived directly from Latin (from words like paediatria and paediatricus/-ica). A French form pédiatrique is attested as having some use in the OED, but it clearly did not win out.
Edit: the pronunciation probably influenced the modern spelling
Chris suggested in a comment here that the spelling might be connected to the pronunciation. Although I initially did not think this was true, I now have found some evidence that caused me to change my mind. It seems to be pretty rare in British English for the digraphs ae and oe to be pronounced as lax /ɛ/. Most apparent counterexamples I first thought of, such as aesthetics, anaesthetize and diaeresis, seem to have variant pronunciations with /iː/ that are used in British English. (And see the comment here by a British speaker: “Oestrogen” and “oesophagus” — why are they spelled differently in British English?) If the spelling ae has come to be strongly associated with the sound /iː/ in British English, this might provide a reason why British people came to prefer the spelling pedagogue.
- heretic, heresy, which also have lax e in the first syllable. Heretic ultimately comes from Latin haereticus, but like pedagogue it entered English through French (hérétique) and the earliest spellings in English used simple e, according to the Oxford English Dictionary (for example, eretik(e), heretyk(e), heretike). The OED also records some variant spellings with ae such as hæretik, hæretick(e), hæretique but they are no longer used.
- spherical is also traditionally pronounced with lax e, even though its Latin ancestor sphaericus has ae, and the spelling variant sphærical which was used at some points in the past has not survived. (The earliest forms of this word are spelled with "e" and start with "sp," like "sperycall.") Of course, the corresponding noun sphere has tense e and is also spelled with the single vowel letter "e," which is another reason that we wouldn't expect spherical to be spelled with ae, regardless of the pronunciation.
- pre-: this prefix comes from Latin prae-, but it is never spelled that way in modern English. These spellings have occasionally been used in the past, though, like praelude and praesident. It is generally pronounced as /priː/, but there are some words where it represents /prɛ/.