At least for software, the vast majority are in some sort of niche you've either never heard of or thought about. Software for managing operating theater procedures, software for managing doctors/dentists, software for managing money exchanges, software for managing legal conveyancing, software for managing schools, etc. Those are examples from places that I've worked that were purely software shops, add to that just about any sizeable company in any industry that have software developers, everything from you pet food brand to your toothbrush manufacturer likely started outside of silicon valley, most without little to no venture capital.
They used to be called micro independent software vendors (mISV) and before the silicon valley gold rush this was the dream of young entrepreneurs.