Out of universe, yes. In-universe, it isn't established how Magikarp and Cosmog can get stronger if they start with a move that does nothing. Especially apparent with Cosmog since it evolving is an important part of the plot point.
I've always seen leveling up as an over-simplified game mechanic version of how Pokémon would actually grow stronger in real life. Just look at the anime and how level are very rarely, if ever, mentioned, and the fact that levels seem to have no impact on Pokémon learning moves or evolving. My point is, Pokémon can mature and grow stronger in more ways than battling, but for sake of game mechanics, that's all we see in the games.
Bigger question-how can Lillie lift Cosmoem, a Pokemon that weighs almost a ton and has the density of a white dwarf, when it doesn't move or have Levitate as an ability? How does something like that not just rip out of her bag?
It may not have Levitate as an ability, but it still floats. If you would allow Levitate as an explanation, then you should allow it floating as an explanation. It's the same logic either way.
As for lifting Cosmoem, gravity. Gravity seems to have a different effect on the lines then normal terrestrial creatures in the pokemon world. As they are stars which stay suspended in the sky, I assume they gave that power to the line that represents them. You don't measure a stars' weight by putting it on a scale, you do a mathematical equation using weights and densities and knowing the chemicals, etc.
Basically the cosmog line isn't bound by earth-physics, it seems to be bound by astro-physics
Sorry, I'm studying to be an astrophysicist, so I've just got to come in and say that that's not how gravity works at all. Gravity has the same effects no matter where you are in the universe. There is no such thing as "Earth physics," just regular physics, and astrophysics is simply a specialization of it. Stars don't "float" in the sky because gravity works on them differently. Nothing's really floating at all. It's just that from an Earth-bound perspective, we expect everything to fall, as we are right on top of a relatively massive object, but off the Earth it's more about the interactions between all the various massive objects which are extremely far from each other. For example, stars actually are falling, they're just falling around the super-massive black hole in the center of our galaxy in an orbit.
Sorry if you didn't want an astrophysics lecture, I couldn't help myself.