Firstly, the bar does not need to be over the midfoot for your balance to be over your midfoot. Instead, the combined centre of mass of the bar and the lifter's body needs to be over the midfoot, which means if the centre of mass of the lifter's body is in front of the midfoot (such as if they're leaning forwards), then the bar actually needs to be behind the midfoot.
Secondly, the hack squat starts with the ankles and knees bent, because you need to reach down to grab the bar. This makes some room for the bar to be positioned over the heels when it is touching the calf muscles. Combined with a slight forward lean, this is enough to keep the lifter and bar in balance.
At the top of the lift, the lifter will generally be leaning forwards from the ankles in order to bring the bar a little forward over the foot and remain in balance.
I've seen also that some people start with the barbell on a support (and so raised from the floor) whilst others start with it on the floor. Do you suggest one of them from an equilibrium point of view?
That sounds like a combination of a hack squat with a rack/block pull, which is a deadlift variation used for training the lockout portion of the lift. Due to the fact that tension at elongated muscle lengths is important for hypertrophy, it doesn't sound like a particularly useful variation for a hack squat, where the goal is usually leg hypertrophy rather than strength or powerlifting competition. It should probably be viewed as the hack squat equivalent of a half squat.