Both phrases are correct, but they can convey slightly different meanings:
1. "I enjoy learning in school" suggests that you find the process of learning while you are physically inside the school building enjoyable.
2. "I enjoy learning at school" is a bit broader and implies that you find the act of learning associated with school, whether inside or outside the physical premises, enjoyable.
The choice between them depends on whether you want to emphasize the physical location (in school) or the overall educational experience associated with school (at school).