The state is an engine, not a caboose
It used to be.
Some believe it still is, but I think the last gasp of the real "engine" was the dot-com boom, which was, of course, largely based on BS that people were feeding themselves and others. I'm in IT. I believe in technology, wholeheartedly, as well as the true value of the Internet. That's not what the "bubble" was really about. We're not the caboose, but we're not the engine we used to be, either.
See my post, and that list of legislation. California has done a great deal to make itself a broken-down engine, with its state legislature treating business as the enemy, higher ed doing its best to encourage racial divisions, and K-12 turning in atrocious results despite huge budgets. There are more and more people homeschooling around here, in town, where there are plenty of schools nearby. And much of the next generation isn't staying here.
For those who complain about illegal immigrants: yes, it's true, our welfare state becomes a bigger problem when people run across the border and benefit from it, and when the people vote to stop that but the Federal courts tell us we are not allowed to stop it.
But the illegals themselves are willing to work pretty damned hard for a dollar. When you drive by a few able-bodied men, who were born here and had every opportunity the place offered, with cardboard signs begging for money at the freeway offramp, then you drive by the Home Depot down the street with a bunch of men who stand on the corner, waiting only for an opportunity to bust their butts for a few bucks, and begging for nothing, you wish you could deport some of the natives and replace them with illegal immigrants. I'm ambivalent about it, as many here are, for the reason I just outlined.
Still, I think California survives largely on momentum and its image, forged over the past 150 years, when life was much different here than it's become lately. And of course, it has natural beauty in abundance.
As far as being the 7th or 8th largest economy, that puts us right there behind Italy, and way behind France. Neither country is a real mover and shaker in the world of business growth and innovation; I wouldn't call either of them an "engine". They just have relatively large economies, in part due to history. I wouldn't get too confident in California's ability to remain an "engine."