I'm working to the Wikipeadia definition:
Metagaming is any strategy, action or method used in a game which transcends a prescribed ruleset, uses external factors to affect the game, or goes beyond the supposed limits or environment set by the game. Another definition refers to the game universe outside of the game itself.
Metagaming is not ipso facto a bad thing and it happens in every game to a greater or lesser extent. The fact that you ask the question inherently assumes that metagaming is bad (otherwise there is no point to the question): I raise this to explicitly call out your not necessarily correct assumption.
Each table must decide for themselves what they consider is unacceptable metagaming as opposed to what they will permit. Of course, if it's allowed in your game then, by the definition above, it stops being metagaming because the game now accommodates it.
For example, a professional football coach choosing his lineup and strategy for Saturday's match based (partly) on who the opposition is, is metagaming: the strategy is informed by things that are outside the rules of the game of football. However, when considered within the completion as a whole it's not metagaming and any coach who didn't do it would not be a coach for long.
The initiative order and the effects of spells:
- do not transcend the prescribed ruleset,
- do not use external factors to affect the game,
- may go beyond the supposed limits or environment set by the game, and
- do not involve the game universe outside of the game itself
The only aspect of metagaming that applies here is one of verisimilitude - you seem to think that initiative order is something known to the players but not the characters. If so, then your problem goes deeper than deciding what spell to use based on that order - your mind should be rebelling at the fact that people in combat take turns in the first place!
There are two ways of reconciling this:
It's actually a fundamental feature of the fantasy world that includes dungeons and dragons, magic and monsters. If the PCs were playing us they would be equally discombobulated that combat here happens in a wildly simultaneous way.
The abstraction that we use is hiding the fact that trained people in combat actually coordinate their actions. The spell grants advantage partly because of the magic, partly because the spell caster picked the opportune time to cast it and partly because the attacker knew it was coming because she and the spell caster are part of a tight-knit fighting machine and they practice this stuff off-camera.
In either case, there is a narrative analogue to the mechanical resolution which allows whatever small metagaming there is here (if any) to be safely ignored.
As a final point, without knowledge of the mechanics of the game the spell would be rather useless. This is true of a large number of spells and other effects: the spell Guidance, Bardic Inspiration and the Lucky feat all spring to mind.