This seems to me to pretty clearly be the story Profession by Isaac Asimov.
I remember a story (by Asimov maybe?)
Yep, it's by Asimov.
about a future in which teaching in school is done through infusing the material into kids' brains?
To quote Wikipedia, the story is set in a society "in which children are educated by almost instantaneous direct computer/brain interface, a process known as taping".
One kid doesn't fit in life because his brain isn't assimilating the knowledge.
When the main character goes to get tested for which profession he will be "taped" to join, he isn't allowed to join any, and is instead sent to a "House for the Feeble Minded", because he is "unable to be educated".
At the end he finds where the books are created, and he goes on to write the books.
After the bulk of the story, the main character realizes that the tapes (and the knowledge on them) need to come from somewhere and that the "house for the feeble minded" actually is for the people who are creative enough to make the tapes. He is therefore someone who is truly innovative enough to create those tapes.