"once this view is shattered"
Maybe the word shattered is a bit misleading (overly dramatic, stressful, etc). When we come to understand something clearly, for the first time, doesn't that normally bring a sense of relief? And maybe: new possibilities, promise, hope, etc?
Maybe we should say our self-view is adjusted, improved, clarified, that sort of thing—not shattered.
The Buddha never said that there is no self. He said that whatever is inconstant, is stressful, and it would be wrong to consider that as "me" or "mine."
On the other hand, walking The Path requires a healthy "sense of" self: this is a skillful use of the concept of "self."
"how do these illusions/ vijñānas get created in the first place?"
In a word: ignorance.
As you progress on the path, your Right View(s) replace your wrong views and ignorant views and unskillful ways. This is what it means to become a stream winner: you've entered the stream. The stream of new understandings and behaviors and results—Right View, Right Resolve, etc —and you are pulled along with all of that.
Okay, maybe you have to paddle a little, but you do it willingly, and gladly because you know there's no going back to your ignorant old ways now.
"is it guaranteed that after enlightenment we are free from it forever?" (from your comment)
There are no guarantees in life, but the Buddha says: "My actions are the only true belongings. My actions are the ground on which I stand."
You don't need (or want) other people's promises, when you've got the power of skillful action instead!
As far as knowing the truth of any of this, there's a sutta (see below) where an average person (who happens to be a prince) asks a monk about the teachings of the Buddha. But because he's a prince and doesn't want to give anything up, his question is not sincere, and he really just wants to dismiss whatever the monk says so he can get back to his life of sensuality. It's a good example of how ignorance frames and ignores whatever it needs to, in order to get what it wants—but remains ignorant in the bargain.
The main point is: guarantees are unreliable, better to put a little effort in and find out for yourself instead. Also, the view improves a little bit every step you climb.
Excerpt from MN 125 Dantabhūmi Sutta | The Level of the Tamed:
“Aggivessana, it’s as if there were a great mountain not far from a
village or town, and two companions, leaving the village or town, were
to go hand in hand to the mountain. On arrival, one of the companions
would stay at the foot of the mountain, and one would climb to the top
of the mountain. The companion staying at the foot of the mountain
would ask the companion standing on top of the mountain, ‘What do you
see, my friend, standing on top of the mountain?’
“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, & delightful lakes.’
“The other would say, ‘It’s impossible, my friend. It’s unfeasible,
that standing on top of the mountain you would see delightful parks,
delightful forests, delightful stretches of land, & delightful lakes.’
“Then the companion standing on top of the mountain, descending to the
foot of the mountain and grabbing his companion by the arm, would make
him climb to the top of the mountain. After letting him catch his
breath for a moment, he would ask him, ‘What do you see, my friend,
standing on top of the mountain?’
“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, & delightful lakes.’
“The other would say, ‘But just now didn’t I understand you to say,
“It’s impossible, my friend. It’s unfeasible, that standing on top of
the mountain you would see delightful parks, delightful forests,
delightful stretches of land, & delightful lakes”? Yet now I
understand you to say, “I see delightful parks, delightful forests,
delightful stretches of land, & delightful lakes.”’
“The other would say, ‘But that’s because I was standing blocked by
this great mountain and didn’t see.’