The story of Jonah is traditionally seen as a warning against disobeying God. Jonah rebels against the directive of God, attempts to flee, is tossed overboard, consumed by the great fish, repents, and is spewed up on land. As a moral teaching it seems fairly straightforward.
As you suspect, though, there's more to it when we dig deeper to the metaphysical level at which characters become aspects of our own consciousness. Each of us is here to achieve a given spiritual purpose—to make a unique and important contribution to the creation of the new consciousness that Jesus describes as 'the kingdom of heaven.' We may live in ignorance of that purpose or we may make choices that do not guide us in the right direction. Jonah is directed to Ninevah, but he isn't forced to go there. He's free to head off in another direction. Our own 'Jonah consciousness' may be distracted by many diversions or may insist on finding an easier, softer way.
However, choices have consequences. We may spend a lot of time suffering through storms, but there is an innate awareness (represented by the sailors) that the underlying problem is that we are out of alignment with God—with our own spiritual purpose and power. It's only by moving deeper into the storm—by surrendering to the consequences of our choices—that we are given the opportunity to pause, take stock, and make new choices. From this metaphysical perspective, then, the 'great fish' isn't a punishment, but a gift. It's a time apart, a time of enforced stillness and complete surrender.
I find the rest of the story—Jonah's ministry to Ninevah and his petulance when God doesn't impose the wrath the prophet's been predicting—to be equally as important. Many people, when they come to an awareness of spiritual purpose, immediately assume themselves to be masters over that purpose. Thoughts in our own consciousness insist that they know 'how it works' and can predict the outworkings of Spirit. But the only thing certain about the Power we call God is that it is a Power of Love. Its purpose is always to express as love at every opportunity. We are simply to be channels of that love, not to presume that we can control or direct it.