Fabian said in a comment,
My personal suspicion is that those two numbers compare apples with oranges, and if that is so it would make a fine answer.
An explanation of the capital cost of the high-speed rail proposal is available here: California High-Speed Rail Authority | Revised 2012 Business Plan | Chapter 3, found via the Business Plan website.
As shown in exhibit 3-2 on page 3-7, the largest cost is viaducts and tunnels:
The Route optimization (pages 40 and 41) of SpaceX's PDF says,
The proposed route considers a combination of 20, 50, and 100 ft (6, 15, and 30
m, respectively) pylon heights to raise and lower the Hyperloop tube over
geographical obstacles. A total tunnel length of 15.2 miles (24.5 km) has been included in this optimization where extreme local gradients (>6%) would
preclude the use of pylons. Tunneling cost estimations are estimated at $50
million per mile ($31 million per km). The small diameter of the Hyperloop
tube should keep tunneling costs to a far more reasonable level than traditional
automotive and rail tunnels.
Another difference is the complexity of the network: the SpaceX proposal is high-speed point-to-point; in contrast, the railway document says,
The new development landscape has necessitated adding many miles of elevated structures, tunnels,
and other infrastructure. The new designs permit access to major downtown population centers with
reduced community impacts and disruption. Approximately 30 to 36 percent of the Phase 1 Blended
system may be built on elevated structure or in tunnels, depending on alignment alternatives. The
possible length of elevated structures increased from 77 miles in 2009 to between 113 and 140 miles,
and tunnels increased from 32 miles to between 44 and 48 miles(with the ranges based on different
alternatives still under consideration).
After the track, the next biggest cost of the rail proposal seems to be land-related:
A analogous section of the Hyperloop document (titled "Making the Economics Work" on pages 4 and 5) says,
The pods and linear motors are relatively minor expenses compared to the tube
itself – several hundred million dollars at most, compared with several billion
dollars for the tube. Even several billion is a low number when compared with
several tens of billion proposed for the track of the California rail project.
The key advantages of a tube vs. a railway track are that it can be built above
the ground on pylons and it can be built in prefabricated sections that are
dropped in place and joined with an orbital seam welder. By building it on
pylons, you can almost entirely avoid the need to buy land by following
alongside the mostly very straight California Interstate 5 highway, with only
minor deviations when the highway makes a sharp turn.
Even when the Hyperloop path deviates from the highway, it will cause minimal
disruption to farmland roughly comparable to a tree or telephone pole, which
farmers deal with all the time. A ground based high speed rail system by
comparison needs up to a 100 ft wide swath of dedicated land to build up
foundations for both directions, forcing people to travel for several miles just
to get to the other side of their property. It is also noisy, with nothing to
contain the sound, and needs unsightly protective fencing to prevent animals,
people or vehicles from getting on to the track. Risk of derailment is also not
to be taken lightly, as demonstrated by several recent fatal train accidents.
For what it's worth, one critic says ...
Musk’s paper does an excellent job of detailing exact pricing of each element of the project so that there’s no magical thinking involved in the pricing expectations.
... and then goes on the criticize other aspects of the project's feasibility, i.e. heat (from compressing the air), and wind shear on the elevated tube.
Is Musk's estimate realistic? Should cost overruns be anticipated? And if so, can we use previous cost overrun rates on novel megaprojects to project true costs for the Hyperloop?
By definition it is difficult to predict unexpected cost overruns.
Some people (e.g. the conclusion to EnergyNumbers's answer) predict overruns because it is novel technology.
The expected cost are shown on pages 55 and 56 of the SpaceX PDF.
10% of the total projected cost is for the capsule, and 90% is for the tube (so perhaps even large overruns on the capsule side may be relatively insignificant).
The projected cost for the tube breaks down as follows:
Tube Construction 650
Pylon Construction 2,550
Tunnel Construction 600
Solar Panels & Batteries 210
Station & Vacuum Pumps 260
Permits & Land 1,000
Cost Margin 536
Building things such as concrete pylons ("Due to the sheer quantity of pillars required, reinforced concrete was selected as the construction material due to its very low cost per volume"), drilling tunnels, and buying lands and permits, are all fairly well-known technologies.
One of the risks is that Elon himself will not be involved in the project: I would guess this project needs good management including risk mitigation strategies.