Jesus' meaning is that John came with the mission and message of Elijah-- not that he literally "was" Elijah.
Hebrews (9:27) clarifies this when it says, "It is appointed that human beings die once, and after this the judgment."
Whether there was specultion about reincarnation among the Jews of Jesus' time, I cannot say; perhaps there was. But neither Jesus, nor the writers of the Epistles, nor any of the Fathers of the Church taught reincarnation. This would contradict the reality of the Particular Judgment.
The gilgul concept is not literal, but more as you indicated, a [continued] mission.
Lots of stuff out there like David (and the Messiah) being the gilgul of Adam, Moses as the gilgul of Abel, and so forth.
Background info, FWIW, regardless of what the NT is (or is not) conveying about the subject.