There isn't a "Goldilocks speed" for orbit. If you put two objects in space, and give them a velocity relative to each other, then provided that velocity is less than the escape velocity (at their relative distance) the two objects will orbit each other.
Those orbits will be elliptical, and it is possible that the ellipse is skinny and "eccentric" enough for the two bodies to collide when they are closest to each other. But for an object that is several hundred thousand km from Earth, there is a quite a wide range of possible elliptical orbits.
So when (and if) the grand collision happened, there was a huge amount of matter that was ejected up into space. Some probably was moving so fast that it escaped, Some certainly went into orbits that didn't have enough energy and so were small skinny ellipses and the matter fell back to Earth. But there was a lot that ended up in some kind of elliptical orbit. This matter was not all in the same orbit, but it started to coalesce, and form into a single ball, under its own gravity.
Other moons weren't formed like this, they either formed at the same time as their planets as a "mini solar system" (such as the four major moons of Jupiter) or they were captured from the asteroid or Kuiper belts). Initially, the captured moons may have had rather elliptical orbits.
But most moons are in rather circular orbits. Even if the moon was originally in an elliptical orbit, tidal effects will tend to make the orbit more circular. A planet and moon system has a certain amount of momentum and a certain amount of energy. The momentum can't change, but energy can be converted into heat and since tides dissipate some energy as heat, the orbit will tend to change to a shape that minimizes energy, for a given amount of momentum. That shape is a circle. (See Is the moon's orbit circularizing? Why does tidal heating circularize orbits?)
So the effect of tides is to give moons the "Goldilocks speed" that keeps them in a circular orbit.