Now to me, that sounds like metagaming. Characters don't know that they are first level. They don't even know that they can't fight a dragon, or drive it off.
Seriously? PCs do not know that there are much better fighters who can fight small armies of men, wizards who can blow up buildings, clerics who can raise people from the dead? There are not stories of dragons that wipe out entire towns or even cities, regardless of armies of people fighting them?
Sorry, your premise here sounds untenable.
This is not just a random unknown monster. This is a DRAGON!!! I have never been in a D&D game ever where PCs did not automatically have knowledge that Dragons are one of the biggest, baddest monsters out there. It's never been metagaming knowledge to know that.
The 0-level militia men defending the village aren't taking into account their ability within the game to fight a dragon or an invading force.
True. But 0-level militia men are stuck with the situation that they are in. It's one thing to be stuck in a town that a dragon is attacking. It's another to walk into the situation.
In the former, there is no decision. In the latter, the decision should be based on PC motivations, not the fact that it's a game, so go for it.
Sure, the game doesn't explicitly address what to do if the characters abandon Greenest altogether and go somewhere else, but by the same token it doesn't require that they go to Greenest to continue the story, so I'm hard pressed to see that as a failing.
Going to a town with a rampaging dragon flying over it sounds a bit insane.
It's funny. In the Lost Mines of Phandelver, a boatload of people here on the boards argued that 3rd level PCs should not be stupid enough to attack a dragon, even if the module points the PCs in that direction. And if players had their PCs attack the dragon, they got what they deserved.
In this module, people here on the boards are arguing 1st level PCs should be stupid enough to go into the same town as a dragon and not only that, it's perfectly reasonable to have 2nd level PCs attack a dragon.
Which is it? Both sound dumb to me. They are DRAGONS. Duh.
Whatever a game designer writes into a module, even if it is contrary to the previous module, is totally good module design because it's written down?
To me, both of these modules are poorly designed with regards to their dragons. The first one because it's setting up the PCs for a TPK and the second one because the players are forced to play heroic stupid, just to even be part of the first chapter.