I have two 3DS and I had the same problem in one of them, when I set the level to 9 in one of them (I set the other to max :P ), anytime I gained experience the pokes leveled up to Max but when I used them again they returned to 9.
What I did was set the level to 1 of those pokes, and when I...