How does Trezor recover all public keys from different blockchains? I understand that the Trezor is a HD wallet, meaning private-public keys are generated through a deterministic, hierarchical expansion of the root seed. However, when I am in a process of recovering my wallet with a seed, how does it figure out which private-public key pairs map to which accounts on which blockchain? Is it just some sort of brute-force expand and check (see of Bitcoin blockchain has the following address or no) algorithm?
Trezor follows (and helped design) BIP44.

BIP44 details how a single mnemonic may be used to create individual keychains for different blockchains, and how multiple accounts may work within those keychains.

This is not a foolproof system - if you deviate from the expectations of BIP 44 (such as using addresses beyond the 20 address gap limit) automated recovery software will not be able to locate all of the used addresses - This makes it somewhat unfit for commercial uses, since most companies and exchanges need to give out addresses without assuming they will be used sequentially.

For individual wallets, this is a safe assumption, and one that Trezor makes.