I would word this a bit differently. Your O(log n) “build it right the first time” approach is not technically (pun) technical debt, but “technical investment”. This is almost as harmful though, as you are potentially wasting countless people-hours on a product that may wind up as a throwaway project after the business pivots and/or priorities change.
Startups are right to go the O(n²) route for v1. Then for v2, you make the decision to build on/refactor from v1, or start over but leverage the intelligence/lessons from the v1 code.