The length of the tunnel is going to be, IMO, the biggest factor.
Acceleration
According to Wikipedia, the escape velocity of Earth is 25,020 mph (40,270 km/h), or 6.951 mi/s (11.186 km/s). Even if we reduce that to, say, 16,000 mph (25,750 km/h) (as suggested by Alexander Vandenberghe in comments) to compensate for the height of the mountain, it's still a considerable speed.
https://en.wikipedia.org/wiki/Escape_velocity
We can use a combination of a couple of online calculators (linked below in the Resources section) for some "simple" calculations. If we start at 0 for speed and 16,000 mph for a final speed. We can plug in different accelerations to find out how long it'll take to get to that speed in the acceleration calculator. Then we use the average speed of 8000 mph (assuming we increase speed linearly, instead of exponentially or something else), we can put in the time from the first calculator to get the total distance it takes to get the length of the tunnel using the velocity calculator.
If we put in a "modest" acceleration of 5 G's, we get a tunnel length of almost 325 miles (523 km). Even if we drastically bump that acceleration up to 17 G's, we're still looking at a tunnel over 95 miles (153 km) long. For reference, the worlds longest tunnel is 85.1 mile (137 km) long and is only 13.5 ft (4.1 m) wide.
The most acceleration a human has been able to provably withstand is 46.2 G’s, done by Air Force officer John Stapp. This would still be a tunnel over 35 miles (56 km) long. Also, we have to consider that cutting off oxygen to the brain for over 1 minute will kill people. This requires at least 12.5 G's for 59 seconds, if we don't care about brain damage and only death. This would require a tunnel 131 miles (211 km) long.
Air resistance
Even though we would have reduced air in the tunnel due to the only opening existing at the top of the tunnel, we still have to deal with many miles worth of that air before we even exit the tunnel. There's 2 basic options to deal with that:
- Push all the air out in front of the craft because it fits exactly in the tunnel with no room for air to go around the craft as it's accelerating.
- Leave room around the craft for the air to flow around it.
Option 1 is a bad idea, since that creates the most amount of drag, as well as potentially creating hurricane forces as the craft pushes air out of the tunnel in front of it. It also leaves a vacuum behind it, creating suction against the forward motion of the craft and also sucking air back into the tunnel when it leaves. There's just too many reasons why this is a bad idea.
Option 2 has it's problems, since air will have a tendency to build up in front of the craft causing more drag, unless there's enough room around to prevent it, which would have to increase the size of the tunnel as the speed increases.
There's a third option, seal the end of the tube and create a vacuum inside the tunnel, then break the seal just before the craft exits the tunnel. This would create a pressure differential that would shred the craft to pieces. This is part of why the Hyperloop is having issues.
Intrusions
There would have to be some way to prevent any kind of breach to this tunnel. People, animals, and birds may be curious as to what this big opening is and enter it to see what it is. If they were there for a launch, it would be a major disaster, and not just for the unsuspecting sparrow that built a nest on the rail. The craft would likely be seriously damaged, if not mortally crippled by this kind of impact.
But also consider something as small as a drop of water. At approximately 0.05 grams in weight, if it hits the craft as it exits the tunnel at 16,000 mph, it hits with almost 1300 Joules of energy. That's almost twice the energy of a .357 magnum handgun at 790 J and almost as much as a .45 Colt at 1600 J. Even if the craft is "only" going 1000 mph, it's still hitting the craft at almost 5 J, which isn't much in itself, but would still not be desirable. Hitting multiple drops like this would likely create enough impacts and noise to make Launch Control seriously consider an abort.
This means the tunnel would have to be completely sealed along it's length to prevent any kind of breach, even against water leaks. And because rock is still permeable, it would have to be sealed against air, so that it could still maintain the low air pressure granted by the opening at the top of the mountain. After years of operation, enough air and other gasses would eventually leak in to significantly increase the air pressure of the tunnel. Sealing it would considerably increase the cost of construction and it would have to be constantly monitored and maintained/repaired, further adding to the cost.
Other consideration
I'm sure there are other reasons why a tunnel this long will be a major determining factor in why it won't likely get constructed. Initial and running costs are definitely a major factor, but there's other's I'm sure I haven't considered. Time to build and the amount of materials are considerable, and would take more time and effort to guesstimate than I have time to consider right now.
And there's plenty of other considerations that aren't related to the length of the tunnel, but I'm not going into those, since I just wanted to focus on the length of the tunnel. I'll let others look into those.
Resources
https://www.omnicalculator.com/physics/acceleration
https://www.omnicalculator.com/physics/velocity
https://www.omnicalculator.com/physics/kinetic-energy
As we’re just standing at sea level, a standard 1 G of G-force is acting on us. The record for highest G-force on a roller coaster is 6.3, and it’s only manageable because it lasts just a few seconds. Fighter pilots may have to endure up to 8 or 9 Gs while wearing special compressed suits, designed to keep blood in the upper body and prevent fainting.
It’s difficult to calculate the exact level of G-force that would kill a human, because the duration of exposure is such an important factor. There are isolated incidents of humans surviving abnormally high G-forces, most notably the Air Force officer John Stapp, who demonstrated a human can withstand 46.2 G’s. The experiment only went on a few seconds, but for an instant, his body had weighed over 7,700 pounds, according to NOVA.
Check out the video below for an interesting example of lethal, high-intensity G-forces from a design project called the Euthanasia Coaster. It would, hypothetically of course, kill anyone who rode it by cutting off oxygen to their brain. This particular design places the lethal exposure level at one minute of 10 Gs.
https://www.medicaldaily.com/breaking-point-whats-strongest-g-force-humans-can-tolerate-369246
Water supply Delaware Aqueduct United States New York State, United States 137,000 m (85.1 mi) 1945 4.1 m wide. New York City's main water supply tunnel, drilled through solid rock.
https://en.wikipedia.org/wiki/List_of_longest_tunnels
If a breach ever occurred, the air would rush in supersonic speeds with the force of 30,000 kilograms over the entire cross section.
The air would continue to race down the track with explosive force until the pressure equalizes or until it slams into an object - most likely, into the train capsules.
At just 3 PSI (pounds of pressure per square inch), air can cause significant damage to a human body with the potential to result in the loss of human life. At 5 PSI, buildings would begin to collapse and fatalities would be widespread. With 10 PSI, reinforced concrete buildings become severely damaged or can collapse entirely. Most people would be expected to die.
In the case of the Hyperloop, air would enter the tube at 15 PSI (!) equivalent to one atmosphere or 10,000 kg per square meter. As it enters any perforation, the atmospheric pressure would tear open the tube like a tin can. Any and all capsules that stand in the way would be instantly shredded apart. The results would almost certainly be deadly.
https://interestingengineering.com/biggest-challenges-stand-in-the-way-of-hyperloop
A drop of water is 0.05 mL of water, so its mass would be 0.05 grams.
https://www.thoughtco.com/atoms-in-a-drop-of-water-609425
A 180-grain (12 g) bullet fired from .357 magnum handgun can achieve a muzzle energy of 580 foot-pounds force (790 J). A 110-grain (7.1 g) bullet fired from the same gun might only achieve 400 foot-pounds force (540 J) of muzzle energy, depending upon the manufacture of the cartridge. Some .45 Colt ammunition can produce 1,200 foot-pounds force (1,600 J) of muzzle energy [...]
https://en.wikipedia.org/wiki/Muzzle_energy
IK08 - Protected against 5 joules of impact (the equivalent to the impact of a 1.7kg [3.7 lbs] mass dropped from 300mm [1 ft] above the impacted surface)
https://lumascape.com/ik-ratings