A note on the theological knowledge of Hobbits.
The Prologue, 1 Concerning Hobbits, to The Fellowship of the Ring states that by the time of the War of the Ring the Hobbits in the Shire were very used to peace and prosperity.
They forgot or ignored what little they had ever known about the Guardians, and of the labours of those that made possible the long peace of the Shire. They were, in fact, sheltered, but they had ceased to remember it.
So the troubles that came to the Shire during the War of the Ring could be considered a punishment from Eru for the Shire Hobbits' complacency and lack of gratitude, and/or a natural result of the course of events during the War.
The Rangers, remnant of the Dunedain of the North, were the ones whose labors made possible the long peace of the Shire.
The Guardians were the Guardians of the World, the Valar and the Maiar. So the Shire Hobbits had been taught by Men, Dwarves, and/or Elves something of the theology of Middle-earth in or before the early centuries of the Shire history, but in the latter centuries of the Shire, by the time of the War of the Ring, the hobbits either didn't know about the Valar or didn't often care or think about whatever they might have known about the Valar and the theology of Middle-earth.
At least a few Hobbits knew something about the First Age, possibly including theology, during the war of the Ring, the very end of the Third Age of Middle-earth.
In The Two Towers, Book Four, Chapter Eight, "The Stairs of Cirith Ungol", Frodo and Sam rest and compare their situation to that of Beren and Luthien trying to steal a silmaril from the Iron Crown of Morgoth.
'I wonder,' said Frodo. 'But I don't know. And that's the way of a real tale. Take any one that you're fond of. You may know, or guess, what kind of tale it is, happy-ending or sad-ending, but the people in it don't know. And you don't want them to.'
'No sir, of course not. Beren now, he never thought he was going to get that Silmaril from the Iron Crown in Thangorodrim, and yet he did, and that was a worse place and a blacker danger than ours. But that's a long tale, of course, and goes on past the happiness and into grief and beyond it --- and the Silmaril went on and came to Earendil. And why sir, I never thought of that before! We've got - you've got some of the light of it in the star-glass the Lady gave you! Why, to think of it, we're in the same tale still! It's going on. Don't the great tales never end?'
'No, they never end as tales,' Said Frodo. 'But the people in them come, and go when their part's ended. Our parts will end later -- or sooner.'
So Sam and Frodo have heard or read the story of Beren and Luthien at least once each, and also know how the Silmaril came to Earendil and became the star called Earendil.
In The Fellowship of the Ring, Book II, Chapter 8, "Farewell to Lorien":
'And you, ringbearer.' she said, turning to Frodo. 'I come to you last who are not last in my thoughts. For you I have prepared this.' She held up a small crystal phial: it glittered as she moved it, and small rays of white light sprang from her hand. "in this phial,' She said. "is caught the light of Earendil's star, set among the waters of my fountain. It will shine still brighter when night is about you. May it be a light to you in dark places, when all other lights go out. Remember Galadriel and her mirror!"
Galadriel doesn't tell them that the light of Earendil's star is the light of the Silmaril that Beren cut from the Iron Crown of Morgoth. Frodo and Sam must have learned that somewhere else at another time.
In The Fellowship of the Ring, Book II, Chapter 1, "Many Meetings", Bilbo sings a song he composed about Earendil, mentioning many strange names that meant nothing to me when I first read them, and mentioning that the light of Earendil was a Silmaril, though not its history with Beren. When Frodo says he won't try to guess which parts of the song were written by Bilbo and which by Aragorn:
"You needn't,' Said Bilbo. 'As a matter of fact it was all mine. Except that Aragorn insisted on me putting in a green stone. He seemed to think it important. I don't know why. Otherwise he obviously thought the whole thing rather above my head, and said that if I had the cheek to make verses about Earendil in the house of Elrond, it was my affair. I suppose he was right.'
So clearly Bilbo knew something of the history of Earendil, enough to write the song. If Frodo asked about the many strange names, or why it was cheeky to write about Earendil in the house of Elrond, Bilbo might have told him, and so told much of the story of Earendil and of the Silmaril. So Bilbo could have told Frodo, Sam, Merry and Pippin much of the story of the Elder Days, and thus some of the theology, in Rivendell.
And it is possible that Frodo, Sam, Merry, and Pippin had already learned some or all of the much or little information they had about the theology of Middle-earth.
In The Fellowship of the Ring, Book I, Chapter 11, "A Knife in the dark", Aragorn tells the Hobbits at Weathertop the story of Beren and Luthien.
"I will tell you the tale of Tinuviel,' Said Strider, 'in brief--for it is a long tale the end of which is not known; and there are none now, except Elrond, that remember it aright as it was told of old. It is a fair tale, though it is sad, as are all the tales of Middle-earth, and yet it may lift up your hearts.'
Aragorn then chanted a song about the meeting of Beren and Luthien Tinuviel. Then Aragorn gave a brief synopsis of the story of Beren and Luthien, ending with:
...There live still those of whom Luthien was the foremother, and it is said that her line shall never fail. Elrond of Rivendell is of that kin. For of Beren and Luthien was born Dior Thingol's heir; and of him Elwing the White whom Earendil wedded, he that sailed his ship out of the mists of the world into the seas of heaven with the Silmaril upon his brow. And of Earendil came the Kings of Numenor, that is Westernesse.'
So Aragorn did tell Frodo, Sam, Merry, and Pippin that Earendil's Silmaril was the one that Beren cut from the Iron Crown.
This might not have been the first time that one or more of those Hobbits had heard stories about the First Age. After returning from his trip to Erebor Bilbo had become friendly with Dwarves, Rangers, Gandalf, and Elves, and associated with such exotic people whenever he had the chance. So Bilbo had many opportunities to learn stories about the Third, Second, and First Ages of Middle-earth, and the theology contained in those stories, and to pass on those stories and their theology to younger hobbits like Frodo, Sam, etc., depending on how interested they were. At least Frodo and Sam were certainly interested.