Grammatically, I think that the speed reduction does not require a spell slot.
This is heavily discussed in other answers, but I feel that if a spell slot were required, there would not have been a second "you can" in the text.
This is reasonable in the context of other rules
Because Unearthed Arcana is playtesting material and not polished, I'm going to shift the focus of the question slightly: how should a DM rule on this in a game? After all, that is the end point of these rules, and the best we can do here.
In the absence of a grammatical consensus, we can look to other rules to see what's reasonable.
- Reducing speed to zero and knocking enemies prone don't require spell slots in other cases. Part of the Sentinel feat allows characters to reduce speed to zero upon hitting with an attack of opportunity, and the Wolf Totemic Attunement allows barbarians to knock enemies prone on hit as well. These abilities, while they have an opportunity cost, don't require spell slots to be spent, which we can use as a precedent.
- Other invocations have no-save on-hit effects. Repelling Blast, Frost Lance, and Grasp of Hadar all have special effects when you hit with your Eldritch Blast without granting a save. The effects are a bit weaker than the melee invocations, but I think that's a trade-off with the higher risk of being in melee range.
- It's not as strong as you might think. While reducing speed to zero is undoubtedly useful, you still have to hit with your weapon for it to work. Without multiattack, a warlock can only attempt it once per turn. Moreover, the warlock is quite squishy compared to a fighter or a paladin--locking an enemy within melee range of yourself (the greatsword doesn't have reach) might be quite dangerous for a warlock. A halfling warlock that traps a Storm Giant next to him is going to have a bad time next round.
Again, without clarifications or revisions to the UA material, I think that this interpretation is a reasonable one to use ingame.