What you're saying is true... sort of. In your situation, yes, the level 10 Ralts would become stronger. This is because of EVs, or Effort Values, which are extra stat points your Pokemon gain after defeating other Pokemon. The level 10 Ralts would have more EVs than the level 15 Ralts because you would have to defeat more Pokemon to get it to level 19 (as opposed to the level 15 Ralts). To learn more about EVs, click here.
The level 10 Ralts would not be stronger permanently, however. The amount of EVs a Pokemon can gain is not finite- it caps at 502. Because of this, eventually both Ralts' would max out their EVs, and then the level 10 Ralts would be just as strong as the level 15 Ralts. Besides, the extra EVs gained from those 5 levels is so marginal that you probably wouldn't even notice the difference.
So, to answer your question, while the level 10 Ralts might be stronger, this will only be for a little bit, and it is barely noticeable. Because of this, you do not need to look for low level Pokemon to train.