Derogatory word, describing person (a pupil) who memorizes instead of learning?

I believe you are wanting to use the term regurgitate (with the noun form regurgitator):

: to repeat (something, such as a fact, idea, etc.) without understanding it
Merriam-Webster

The fact the word also relates to vomit gives it a negative connotation.

John is just a regurgitator, ...

John is simply regurgitating, ...


You could call such a person a rote learner, though that isn't always a derogatory term; it depends on the context.

See rote learning


There is the expression that someone is learning parrot-fashion.

Simply repeating received phrases like a trained parrot.

This is often seen as a verb, the pupil simply parrots the received lesson.