Before submarines were invented, how deep did people think the oceans were?

First to clear up your apparent misconception, submarines aren't used for measuring depth (the field is called bathymetry). They are far too slow to be of any use for general mapping of the ocean floor. In the modern day, surface ships using sonar, as well as aircraft using LIDAR are used.

Prior to sonar, depth sounding was used, which dates back to ancient times; it's even mentioned in the Bible, Acts 27:28,

They took soundings and found it to be twenty fathoms; and a little farther on they took another sounding and found it to be fifteen fathoms.

The core principle is simply a heavy weight tied to a rope/chain/line of some kind. There are more sophisticated variations on this theme, including none other than Lord Kelvin's own sounding machine.

I can't directly answer your question as to how far back in time various peoples thought the ocean to be, but I can tell you submarines weren't necessary. This map was produced by sounding in 1853 and the measurements are quite accurate at great depth, up to 30,000 feet+.

/r/AskHistorians Thread