How much money is, on average, "on loan" from the Fed?
For repos you mention previously average was 0.165 billion for year 2021 (FRED), the value is different every year. Some years almost none are used. In other years a lot more. For example, in 2020 average was over 100 billion.
If the interest rates are lower than the inflation, does this not constitute (effectively) a subsidy of the banks?
Not necessarily, Banks make profit on intermediation margin. To oversimplify a bit banks are ‘buying’ funds from Fed or sometimes also from regular people in forms of deposits for the federal funds rate or whatever people get on deposit accounts. They then sell these loans to customers for higher interest rate.
However, because of competition they cannot choose the interest rate arbitrarily.
If the competition would be perfect they would simply set the interest rate to consumers equal to federal funds interest rate + their marginal costs (see Freixas and Rochet Microeconomics of Banking).
The bank won’t necessarily make profit thanks to inflation because even though inflation makes its debt to Fed smaller in real terms by the same token the loan that bank issued to customers to make money will have smaller real value.
However, depending on exact market structure the banking sector has and all the details it could turn out to be effective subsidy for the banks.
Is there an estimate of how much this is costing the Fed?
It’s not costing Fed anything. Money for loans Fed makes are made at a keystrokes of keyboard by the Fed employees. There are no real costs Fed incurs for those loans marginal cost of issuing them is effectively 0.
If you want to be pedantic if they issue a lot of loans to private banks they might perhaps need to hire some extra employees which would make marginal costs of those loans non-zero but it’s not a value worth worrying about and there are no estimate for it to my best knowledge.