In Compound V2, borrow interest is paid back to the cToken contract such that all cToken holders have proportional claims to the underlying collateral at the current time. It's somewhat confusing based on the UI that Compound has provided, but basically the history of interest rates is irrelevant.
Lenders "mint" cTokens (e.g. cDAI) by locking up the underlying tokens (e.g. DAI). Each cToken can, at any time, theoretically claim 1/N of the total underlying collateral, where N is the total number of cTokens minted.
As an example, consider a [very simple] system where Alice is the only lender and the cDAI rate is 1:1. (NOTE: These are not paramters you would encounter in practice and are just for example). Here is the lifecycle of a loan:
Alice mints 100 cDAI with 100 DAI1. At this point, each cDAI is worth 1 DAI.
Bob borrows 50 DAI at some interest rate. This must be collateralized with some other compound token, e.g. cETH. Even though he has taken 50 DAI from the system, his debt is still counted in the total assets under management, so each cDAI should still be worth 1 DAI. Note that there is an obvious liquidity constraint here, which is that Alice right now may only redeem 50 cDAI (and receive 50 DAI in return). If she wants to redeem more cDAI, she must wait for Bob to repay his DAI debt.
Bob eventually repays some or all of his loan. For simplicity's sake, let's say he repays the full 50 DAI plus 1 DAI of interest that has accrued. Thus, there is now 101 DAI in the system, which means that now each cDAI is worth 1.01 DAI. At this point, Alice may redeem her full 100 cDAI and receive 101 DAI of collateral.
As you can see, we are not interested in the historical interest rates, only in the amount of underlying collateral we can claim with our cTokens, which were minted at a time when they were less valuable. The general thesis of this sytem is that borrow interest causes the cTokens to become more valuable over time, regardless of the historical interest rates (which are really just relative measurements of how much demand there is for a particular asset).
1Again, the 1:1 rate is not realistic. The real rate depends on system parameters, which I believe remain constant until an administrator decides to change them. IIRC they are determined based on the liqudity and volatility of the token, which are meant to safeguard against big liquidation events -- outside the scope of this post!