I see that the current version of this idiocy (which has been around since Wellhausen the antisemite invented it) tries to pretend that the Torah was invented by Shmuel Hanavi, at the end of the period of the Judges. This was only a few centuries after the Exodus since Shlomo finished building the first temple 480 years after the Exodus and the mishkan at Shilo had existed long before that (including artifacts from the original mishkan in the desert). Thus, the Torah and halachos were well known long before Shmuel was born and "new" laws could not have been invented then.
Note: I use the term anti-semite for Wellhausen based on all the comments that I have seen over the past 40 years as well as the notes in the Hertz Chumash. As an example http://www.ajcongress.org/site/DocServer/Assimilationofjudaism.pdf?docID=2124
Despite Kant’s call for the “euthanasia of Judaism” and despite
Wellhausen’s blatant anti-Semitic tendencies, early liberal Judaism,
as it emerged in Germany and later in America, adapted many of the
views of Kant and Wellhausen, and incorporated them into its
understanding of the nature of Judaism.
I should also point out that the "argument" here is not that Shmuel wrote Shoftim from "stories" that had existed since the time of the conquest and the completion of Sefer Yehoshua, but that he (or later neviim, or kohanim in the time of Josiah or Anshei Knesses Hagedolah or whatever the "critics" decide to pretend) made up the Torah and the halachos out of whole cloth and assigned to it whatever traditions and stories had accreted throughout the centuries. According to that, there was no revelation, no Yetzias Mitzrayim, no halacha, etc. It is calling all the neviim, liars and neviei sheker, since it implies that they never received prophesy from Hashem (which assumes that all previous neviim and the Torah were telling the truth to begin with). Any claim that the mesorah began at some point other than the revelation at Sinai is making this claim, whether or not it admits it.
For Shmuel to make things up, he would also have to make up Sefer Yehoshua and Shoftim. Of course he did write Sefer Shoftim, but the point I am making is that he brought the "stories" up to his current time. If he made things up as claimed, this actually winds up having him make up things that had occurred well within the memory of people then living as well as the records that had been kept by the various tribes since the Exodus and the settling of Israel. Also (as I say above) the mishkan of Shilo had existed for centuries and had records of the kohanim who served there as well as the people who went there. There was no time that he could have invented things and "merged" earlier stories into what was still known and remembered.
Another point is that he wrote Sefer Shoftim using nevua. As a result, he could not have lied about what he wrote without being a navi sheker. Those who claim that he "created" the Torah, and sefer Yehoshua (as well as inventing stories that never happened in Shoftim) are saying that the prophets were liars who did not receive any messages from Hashem. They are claiming that they were false prophets who were subject to the death penalty.
Most of these claims try to say that everything was made up during the later part of the monarchy or by the Anshei Knesses Hagedolah. In any case, they ignore the actual facts of the matter.
One of the main problems with the conspiracy theory is that we state that the entire Jewish people heard the revelation at Sinai. The "Fred theory" states that someone (call him Fred) decided to invent the entire thing and convinced everyone to pretend to believe it. This was done in spite of the entire previous generations were still alive and would never have heard of such a thing. "Fred" also invented a complete system of laws and convinced everyone to start following them, even though noone had done so up till then.
The main problem is that there is really no point in our history in which enough people could have "forgotten" the Torah so that a "Fred" is plausible.
Take a look at A Rational Approach to the Torah’s Divine Origin as quoted in Potential issue with Theory on Divine Origins of Judaism?
or
How Do We Know That We Heard G‑d at Sinai?
or
ראיות מכריעות נגד ולהויזן thanks to @WAF
Rabbi Hertz in his Chumash (written in the 1930's) deals with (the antisemite) Wellhausen's "Documentory Theory" invented in the late 19th century and shows how it falls apart through its own internal logic. He brings many details that were known even then and more has been discovered since then showing that such theories do not hold up.
He also shows that every time new facts show the falsity of their claims, they simply change the claims and pretend that they had said that all along. See the end notes in the Hertz Chumash for details.
For example when discussing the claims that everything was made up by King Josiah we have
Excavations in Jerusalem in 1979–80 by Gabriel Barkay turned up two
amulets dating from the late seventh century BC(E)
The silver scrolls date to the 7th century BCE and contain the
priestly blessing.
Of course this is still well after Shmuel Hanavi but the point is that they keep trying to make these claims and keep failing.
As far as Moshe existing, someone led the Jewish people and was the leader at the revelation. If not Moses, then it was someone else of the same name (:-) Seriously, if we deny that it was Moses, someone had to have been in that position and performed the same role. Thus, it is more likely that the Torah is accurate in reporting what is known about him.
Of course, the claims get around this by pretending that there was no Yetzias Mitzrayim, no revelation at Sinai, no sojourn in the desert, and no conquest of Israel. Somehow, Fred managed to convince everyone (in a society which kept detailed geneological records going back all the way, especially for the kohanim and leviim) to graft a pretend history to the known history of the family.
Note that the claims that stories "developed over the centuries" were suddenly "formalized" means that everyone had to suddenly accept stories that did not apply to them even though some parts had been part of their lore. Additionally, Rabbi Hertz pointed out that there was no point in history except the Exodus in which everything in the Torah made sense. Placing the "compilation of the Torah" at any later date just caused conflicts and misunderstandings as well as contradicting the social and political milieu of whatever time was being claimed.
Also since the Torah was sacred, it could not have been modified "gradually". Even if modifications were made, the Israelites of the time of the Shoftim were sufficiently scattered that they would not have accepted it. Note that they went to war with each other over the Sanhedrin of Binyamin insisting on taking care of the ruling of Pilegesh Begiv'ah independently, while the other tribes declared war to have the tribes as a whole judge the situation. Attempting to declare a previously unknown document "sacred" would have caused another civil war and prevented them from accepting Shmuel as Shofet and Shaul as Melech.
Also note that part of Shmuel's "claim" would have been that the Torah written by Moshe had been kept as a sacred artifact in the mishkan and all of the tribes (and was still available to consult). If this was not true all of the tribes would have known that. Additionally, the Torah assumes that everyone lived within easy reach of the central mishkan and was able to go there regularly. This was no longer true in the time of Shmuel as we see from the story of his birth. A number of halachos in the Torah (such as the story of the daughters of Tzelaphchad) would have made no sense in the time of Shmuel.