This doesn't take scarcity into account and would require an oracle to provide the constants for the necessary formula linking size to difficulty. It's easy to see the case where difficulty outpaces transaction volume; We're about to see that now with ASICs coming online. Once the maximum block size is sufficiently large so that all pending transactions can fit, now we're back to the case where there's no limit and fees trend to zero. Hopefully this example should kill off any ideas about tying block size to difficulty.
I don't think you thought it through. It
does take scarcity into account. Whenever fees start trending towards zero, it will eventually lead to a decrease in mining power. Miners will stop mining. This will decrease difficulty, thus lowering the block size. Eventually there will be scarcity again, thus leading to increased fees, and thus more mining, and a larger block size. There would be an equilibrium and a market.
The problem is the baseline and how much of a difficulty change equals how much of a block size limit change. The baseline could be how much difficulty is at the time of the change (for example), but the other part is tricky. Maybe it could be done as a percentage change, it would change the same percentage as difficulty?