Well, what do the rules say?
Targets
A typical spell requires you to pick one or more targets to be affected by the spell’s magic. A spell’s description tells you whether the spell targets creatures, objects, or a point of origin for an area of effect (described below).
...
A Clear Path to the Target
To target something, you must have a clear path to it, so it can’t be behind total cover.
If you place an area of effect at a point that you can’t see and an obstruction, such as a wall, is between you and that point, the point of origin comes into being on the near side of that obstruction.
An example spell
Flaming Sphere
As a bonus action, you can move the sphere up to 30 feet...
When you move the sphere, you can direct it over barriers...
So I see nothing that says you have to see where it's going. However, I would also rule that in order to "direct it over barriers" you would have to see the barrier (or pit).
However, how you are directing it is completely up to the DM and I would say that in most cases it would be incredibly difficult. Imagine going into a closet, closing the door and then flying a drone around the house without hitting any walls. Unless you live in a studio apartment, it's probably going to be nearly impossible. Make that an area you've only glanced at and I think the odds are slim and none and slim just left town.