That could well be; however, I'd leave open two other possibilities: one, that they are datable to
Melkor's tampering with
Middle Earth, but rather than being "his"
creatures, are a product, or byproduct, of the general poisoning that occurred in its attempted transformation into "
Morgoth's Ring". In which case, he, like
Sauron, may not even have been aware of their existence.
The other possibility is that they
pre-date Morgoth's entry. It's difficult to imagine these things being a part of
Eru's plan, but the existence of
evil things wholly apart from Melkor is hinted at in various
places,
Ungoliant being the prime example. They
could, like her, be creatures from the Outer Darkness, which somehow got into
Arda, and "sneaked in" to the
Misty Mountains after their raising by Melkor.
And there is in fact a third possibility: though we very naturally associate underground "nameless things" that "gnaw the world" with horror and evil, neither of the quotes above actually make that moral judgment.
Gandalf does, in the passage quoted, go on to say:
'Now I have walked there, but I will bring no report to darken the light of day.'
This would appear to form a "moral" judgement, reinforced by the light/darkness opposition, which is normally equated with good/evil. But the passage continues:
'In that despair my enemy was my only hope, and I pursued him, clutching at his heel. Thus he brought me back at last to the secret ways of Khazad-dum. . .'
This, it seems to me, indicates that the danger to Gandalf lay, not in the "nameless things", but the possibility of becoming lost in the dark tunnels they had made. That would fit the Ironic fictional mode which forms this part of Gandalf's story-arc, and of which a sense of lost direction is an important aspect.
I raise this as a possibility because in romance, though the black/white, evil/good polarization of characters comes to the fore, there is another category of characters who, in critic Northrop Frye's words:
. . .elude the moral antithesis of heroism and villainy [and]
generally are or suggest spirits of nature. They represent partly the moral neutrality of the intermediate world of nature and partly a world of mystery which is glimpsed but never seen, and which retreats when approached.
This description certainly seems to apply to the creatures, whatever they are, in both The
Hobbit and LOTR. They may be frightful to us, as they would have been to
Bilbo, had he actually encountered them in other than his fears, but they are not described as
innately evil.
And in fact, some of the "spirits of nature" which go on to prove helpful to the "good" characters are initially, or originally, feared:
Treebeard and the
Druedain, for example. Even the
Silvan elves of
Lorien have this effect on the
hobbits, at least. Frye gives, as the reason for this, that
Such characters are, more or less, children of nature, who can be brought to serve the hero, like Crusoe's Friday, but retain the inscrutability of their origin. As servants or friends of the hero, they impart the mysterious rapport with nature that so often marks the central figure of romance.
That very well describes
Tom Bombadil, perhaps the foremost character of this kind in the story, but it applies to the others as well; as Treebeard says:
'I am not altogether on anybody's side,
because nobody is altogether on my side,
if you understand me.'
I'd suggest a range of characters who "elude the moral antithesis" to a greater or lesser extent, from
Bombadil, who, though we would have to place him on the "good" end of the scale, would be, as Gandalf says, a very dangerous guardian for
the Ring, through the Druedain, who, despite their hatred of
orcs, are feared and hunted by
men, to (possibly) include even the "nameless things".