When he falls on the bridge of Khazad Dum, why didn't the fellowship know he was a maia and immortal and therefore return?
None among the fellowship knew:
"...they belonged solely to the Third Age and then departed, and none save maybe Elrond, Círdan and Galadriel discovered of what kind they were or whence they came" - "Unfinished Tales", Part II "The Istari"
This is discussed in deeper detail here: "Who in Middle-earth knows the Istari's origin?"
"why"? Because you don't reveal important military secrets unless there's a need to know. And nobody needed to know. If they don't know, they can't tell Sauron (who didn't know, and who Gandalf was very cautious about NOT letting know, including refusing to touch the Palantir for that reason),
Leaving aside speculating of whether they knew he was a Maia or not, even if they DID know, it'd be a useless knowledge in terms of predicting Gandalf's return.
This is because Gandalf did not return due to his Maia-ness - but due to Eru Iluvatar's personal decision to return him (otherwise, he'd simply have reverted to being a Maia).
This is discussed in detail in the following answers, with relevant quotes:
I've never read any indication that anybody knew what Gandalf really was. Well, maybe Treebeard had some idea:
Book III, Ch. 4 Treebeard:
‘Then I can answer your other questions,’ said Treebeard. ‘I am not going to do anything with you: not if you mean by that “do something to you” without your leave. We might do some things together. I don’t know about sides. I go my own way; but your way may go along with mine for a while. But you speak of Master Gandalf, as if he was in a story that had come to an end.’
‘Yes, we do,’ said Pippin sadly. ‘The story seems to be going on, but I am afraid Gandalf has fallen out of it.’
‘Hoo, come now!’ said Treebeard. ‘Hoom, hm, ah well’ He paused, looking long at the hobbits. ‘Hoom, ah, well I do not know what to say. Come now!’
Book III, Ch. 9 Ftotsam and Jetsam:
‘Treebeard heard his voice and came out of the shadows at once; and there was a strange meeting. I was surprised, because neither of them seemed surprised at all. Gandalf obviously expected to find Treebeard here; and Treebeard might almost have been loitering about near the gates on purpose to meet him. Yet we had told the old Ent all about Moria. But then I remembered a queer look he gave us at the time. I can only suppose that he had seen Gandalf or had some news of him, but would not say anything in a hurry. “Don’t be hasty” is his motto; but nobody, not even Elves, will say much about Gandalf’s movements when he is not there.
Of course this is open to interpretation - did Treebeard know that Gandalf wasn't the kind of being that could die, or did he know G. was alive because they'd been meeting in private? Then again, Treebeard also said this:
Book III, Ch. 4 Treebeard:
‘Saruman is a Wizard,’ answered Treebeard. ‘More than that I cannot say. I do not know the history of Wizards. They appeared first after the Great Ships came over the Sea; but if they came with the Ships I never can tell.
So, maybe Gandalf was a mystery to Treebeard, too.
I would guess, though I don't have a cite, that Tom Bombadil probably knew, and a few of the High Elves (Galadriel, Celeborn, Cirdan) had their guesses. Even if they did know the sort of being G. was, they knew what the Balrog was, too, and figured the Balrog could kill G.
But for 99.999% of the people in Middle Earth Gandalf was just this guy.
Book V, Ch. 1 Minas Tirith:
Yet by a sense other than sight Pippin perceived that Gandalf had the greater power and the deeper wisdom, and a majesty that was veiled. And he was older, far older. ‘How much older?’ he wondered, and then he thought how odd it was that he had never thought about it before. Treebeard had said something about wizards, but even then he had not thought of Gandalf as one of them. What was Gandalf? In what far time and place did he come into the world, and when would he leave it?
That was how most everyone thought about Gandalf.
They didn't know because he didn't want them to. That knowledge would have changed everything they did.
If his true identity/nature were known it would have been too great of a temptation for people to take his words as 'orders' and not as 'counsel'. Gandalf came to Middle Earth to counsel the people, not to rule them or to confront Sauron by force. His mere presence in a room would have been too disruptive for others to conduct business and make decisions on their own if they knew his true nature. The world was to be left to the dominion of men so they had to learn to discover the correct path without undue influence.