Why -ian instead of -ien and -üan instead of -üen? Why are words like 天、面、先、盐 romanized in pinyin as tian, mian, xian, and yan, even though the ending is pronounced [iɛn], and would be better represented as -ien? Likewise, why are words like 卷、全、选、元 romanized as juan, quan, xuan, and yuan, when the final is pronounced [yɛn] and would be better represented as -uen? (at least the way northern Chinese people pronounce it – it seems that southern Chinese people pronounce it as [yan])

Is it that those words actually were pronounced with a [ian] and [yan] final in the past? That doesn't seem like a complete explanation, as Wade-Giles uses -ien, and Wade-Giles is from 1892 (although it does use -üan and not -üen).
Although Wade–Giles uses -ien, Zhuyin (1910) uses ㄧㄢ -ian, Gwoyeu Romatzyh (1926) has -ian for the basic form of first tone, Latinxua Sin Wenz (1931) has -ian, and Yale romanization (1943) uses -yan. Likewise, pinyin's usage of -üan instead of -üen for [yɛn] has precedence in Wade–Giles (1892) -üan, Zhuyin ㄩㄢ -üan, Latinxua Sin Wenz yan, and Yale ywan.
Yale romanization in particular was supposed to be designed to be intuitive for English speakers to pronounce, which suggests that its yan and ywan were not pronounced [iɛn] and [yɛn] at the time, but rather [ian] and [yan].
Alternatively, these could be a holdover from Zhuyin. In Zhuyin, pinyin -ian is represented as ㄧㄢ -ian, and couldn't be represented as ㄧㄣ -ien, because that's used for pinyin -in.
Pinyin also draws inspiration from Zhuyin in other ways, such as the tone accent marks and the spelling of bopomofo (rather than *buopuomoufuo).
Perhaps Zhuyin could have created a dedicated -ên symbol, but overall, Zhuyin is somewhat minimalist in its inventory of finals. For example, it could have made sense to have dedicated letters for -in and -ing, rather than representing those sounds with -ien ㄧㄣ and -ieng ㄧㄥ. In fact, the character ㄣ -en is derived from 乚 yǐn, even though yin and en are different syllables.