Middlewares can be on-chain protocols or off-chain services that are "chain agnostic". Hence middleware networks can work on and support a variety of different, underlying layer-1 blockchains. Please note that most middleware networks start out with support for one L1 (e.g. Ethereum) and add support for further L1s in the future.
Web 3.0 is built upon a layered stack of interoperable networks. It is difficult to draw clear lines between each layer of the stack as boundaries tend to blur between each layer. However, the model helps to better conceptualize Web 3.0. It also provides points of reference for investment decisions in a highly heterogeneous, fragmented Web 3.0 ecosystem. We borrow heavily from the work of Multicoin Capital and highly recommend reading their comprehensive, in-depth article about 'the Web3 stack'.