I worked at engineers-call-the-shots fintech and later SV shops for many years. No, their in-house code is not worse than open-source.
In fact one can safely say that top companies that attract top talent also have methodologies in place that lead to better than average code quality.