Jesus refers to them as real: “ Male and female he created them.” So does the rest of the Bible refers to them as historical and not allegory.
Aside from the fact that there’s no way of knowing that Jesus said anything attributed to him decades after his death, Jesus also purportedly said that Abraham was up in heaven able to deliver drops of water to people suffering in hell. But you don’t believe that’s literal, and you have no evidence that Jesus wasn’t just referencing elements of a story to make a point. (A point that demonstrates ignorance of various intersex conditions, but a point nonetheless.) And if Jesus did literally believe Adam and Eve were real people, then he was wrong.