The Vilna Gaon's statement in (1) cannot be true in the simplest literal sense.
Informational content of the Torah
The Torah can be modelled by a 25-symbol alphabet:
- 22 letters
- space (word break)
- pasuk break
- perek break
This is a little broad: it doesn't seem possible to end multiple chapters or verses in a row without any letters in between.
Conversely, this undercounts variations in the shape of letters, such as a mem sofit appearing inside a word. However, there are less than twenty such variations, so this channel clearly isn't being used to transmit as much information as possible.
How many of these symbols does a sefer Torah contain? Using the counts from this answer:
- 304,805 letters
- 79,975 breaks (79,976 words, each of which except the last one precedes a space, pasuk break, or perek break)
which is 384780 symbols in total.
Thus, the Torah can contain at most log_2(25^384,780) = 1,786,863 bits of information = 218 kB.
This applies no matter what technique is used to extract this information, whether by reading the pshat or searching for codes. Each bit of the Torah controls at most one non-redundant bit of any derived interpretation; to get more, more information must be brought in for outside. This can be done in illegitimate ways (twisting the text for a favoured interpretation) or in legitimate ways (assuming that the Torah assumes that the reader knows obvious things, such as what humans look like, and doesn't spend any time giving a description).
218 kB is certainly not enough for "the details of every species and every person individually, and the most minute details of his life from the day of his birth until his death": there are millions of species and billions of people.
Then what does the statement mean?
I'm having some difficulty here.
The obvious thought is that "Torah" is to be understood as all that is taught (in particular, including the Oral Torah), not as the physical words of the written Torah. Indeed, this is the ordinary meaning of the word. But the quote says "from 'Bereshit' to 'l'enei kol Yisrael'", which seems to mean specifically the five books.
The other obvious thought is that the minute details are not mentioned explicitly, but unfold from what is written. For example, I can write a simulation of a ball of gas expanding: it takes very little information to describe the whole system, but much more to pinpoint any particle (by position and velocity) inside the system.
Maybe likewise, the Torah implies the life history of every person, but doesn't stop and say "this life history belongs to this particular person". But that seems inconsistent with reports of mentions of a single individual.
Alternately, some say that the Torah contains not only the physical letters, but also hidden spiritual letters. However, the count given is 600,000 letters total (physical and spiritual), which is still very short. Perhaps the Vilna Gaon (and the Ramban?) doesn't hold by that count?
Thus, option (2) in the question looks likely: that "everything is contained in it" means at least "all wisdom" (and some of this wisdom is also found outside the Torah). If (1) is also true, then it's true in a more complicated sense.