You've worked for the "big names" and found disaster. Been there, done that, too! The problem with large companies is your voice gets drowned out. There's very little you can do to effect change. You're just pushing paper. Not very fulfilling.
I've been happiest at midsize companies. There's no single definition of "midsize" but here's a useful definition: they're big enough to be a serious contender in their market, but they're not the dominant player in their market. Those companies tend to provide the financial security of the "big names", yet want to hear your voice and your ideas as to how they can become the dominant player in their market. Best of both worlds kind of deal.
As far as creating software goes, I've been happiest in product development. Your software is part of a solution being sold to a client. A lot of engineering-oriented companies provide those kinds of opportunities and tend to have an engineering culture.
As far as making your own product, remember, people don't buy software - they buy solutions. If you can't succinctly identify your customer's problem, then they won't believe you have the solution. Period.
For others reading this, here's something else you should know from someone who's had a loooong career in this field: when the MBAs take over management, it's time to go. I know, I know, I'm painting with a broad brush BUT my experience has been, time and again, when they show up to your company your company is likely doomed. I've seen way too many companies doing just fine until the MBAs showed up. Just look at what's going on over at Boeing now. They're just one example of thousands.