The issue with "infinite" is also infinite
in time, in the sense that all you're saying is "if we knew the future, we'd be right".
In kNN the model is the historical dataset. (Aside: neural networks are basically kNN+Compression, model=compressed(dataset)).
kNN is therefore, in a sense, a perfect illustration of learning in the ML sense being widely at odds with any standard prior notions of "learning" we might have.
The goal of learning in animals is "mastery of the concepts" which enable one to imagine the ways the world might be, to reason, and likewise, act under novelty.
Learning in the ML sense is the "shortcut", basically, remember everything and have an index on-hand. This is an incredibly brittle strategy, as anything worth learning in-the-usual-sense has no near-identical-cases to consult.
if kNN = "k + data", then kNN tends towards perfect, as `data` tends towards "we already have the answer" and `k` tends towards `1`.
This is a general scheme for ML. If the `data` isnt already the solution, `ML` is useless.