Companies don't earn profits just by magic. First, they have to invest in products, services, and infrastructure to provide useful goods and/or services for customers. The more useful the product or service, and the more difficult that product or service is to replicate, the more a company and its shareholders stand to benefit.

Today, there are three household-name tech giants investing billions of dollars in massive projects that could pay off hugely in the future. However, with the market concerned about interest rates and the economy, these stocks are getting punished for that very spending today.

But for long-term investors, a beaten-down stock with a big potential future revenue stream spells "opportunity."

Amazon is building a massive e-commerce infrastructure

Amazon.com (AMZN 1.49%) sold off after its recent earnings report. Revenue was in line with guidance, but operating income declined year over year, as Amazon's costs soared in its e-commerce business.

Before the pandemic hit, Amazon had been investing in its logistics infrastructure to provide free one-day delivery, down from its previous two-delivery promise for Prime customers. That was a huge undertaking.

Then, when the pandemic hit, Amazon had to turbocharge its spending on infrastructure to satisfy all the demand for its regular two-day service. Given rising labor and fuel costs, Amazon's costs and capital expenditures soared. Over the next two years, Amazon doubled the size of the fulfillment network that it had taken nearly 30 years to build prior to COVID-19.

On the Q1 conference call with analysts, Amazon said it had gone from undercapacity during the pandemic to overcapacity today, as e-commerce demand corrected back to its prior course. While that's pressuring margins in the near term, it also means that Amazon's logistics platform is ready to shine. Management said the company was only now just getting delivery speeds back to pre-COVID levels.

Now that Amazon has built out this massive logistics network, it should have a huge advantage over rivals. If you can get free shipping to your door in one day, or even the same day, you'll have even less of an impulse to visit a store -- especially if fuel prices stay this high. That could lead to increased sales in the second half of the year.

Moreover, Amazon just opened up "Buy with Prime" to online merchants off the Amazon platform, giving independent e-commerce companies access to its fast, free shipping, payments infrastructure, and free returns. Amazon's delivery network now rivals those of a FedEx or UPS -- and it can probably undercut their prices, since it will be using spare capacity from shipping its own goods.

Since revenue is decelerating in the first half of the year over difficult comparisons, Amazon's margins are down. However, profits should inflect upwards when revenue grows again, since Amazon won't be spending as much. That could happen as soon as Prime Day in Q3 or the holiday shopping season in Q4.

Meta Platforms: What's in a name?

The market has also punished Meta Platforms (META 0.14%), formerly known as Facebook, for a massive project into which it's plowing billions of dollars every quarter. Late last year, Facebook CEO Mark Zuckerberg announced the company would be changing its name to Meta Platforms, while investing billions to build out the metaverse, a catchall term for a new digital world that feels like reality.

In combination with the name change, Meta Platforms began to break out results from the metaverse-focused "Reality Labs" segment. This exposure showed that Reality Labs is burning about $3 billion every quarter.

Today, investors really don't want to see companies spending billions of dollars on a futuristic vision with an uncertain payoff. On the recent conference call, Zuckerberg said: "[T]his is laying the groundwork for what I expect to be a very exciting 2030s when this is like -- when this is sort of more established as the primary computing platform at that point. I think that there will be results along the way for that, too. But I do think that this is going to be a longer cycle."

Meta Platforms will be releasing a version of its Horizon metaverse operating system this year, and it will likely monetize more opportunities along the way. Last quarter, sales of Oculus headsets were $695 million, up 30% over the past year. Meta is also likely to realize platform fees from sales of digital goods in its metaverse over the next few years.

The company's ambitions leave me torn. While I think the metaverse may be an enormous opportunity, of these three stocks, Meta Platforms is the most likely to cause disappointment. Will the metaverse be widely adopted as the "next major computing platform," as Zuckerberg says? Or will it just be a niche application for gamers and tech enthusiasts? At this point, it's hard to say.

A technician in a full cleanroom suit holds up a square semiconductor chip.

Image source: Getty Images.

Intel is attempting the "biggest comeback in semiconductor history"

Meanwhile, the market has really soured on Intel (INTC 0.61%) in recent years. That's because Intel used to make the best and fastest chips in the world, but a few years ago, Taiwan Semiconductor Manufacturing Corp. (TSMC) passed it at the leading edge. That gave Intel's rivals a chance to leapfrog "Chipzilla" to produce the most advanced, power-efficient chips on the market.

TSMC doesn't produce its own chips, but rather acts as a third-party manufacturer for most of the world's leading chip designers. Under new CEO Pat Gelsinger, Intel is now embarking on an ambitious quest. Not only does the company hope to catch up to TSMC on leading-edge technology for its own chips, but Gelsinger also wants Intel to become an outsourced foundry to other designers too, rivaling TSMC. Given that more and more large tech companies are now designing their own custom chips for specific applications, that makes a lot of sense.

Can Intel pull it off? Again, it's uncertain what the payoff will be, but as of last quarter, it already had a $1 billion revenue run rate producing chips for third parties. Gelsinger also said on the recent earnings call that the company had engaged 10 qualified "anchor clients" to produce chips once it has built out its foundries. Intel is beginning construction on multibillion-dollar fabrication plants in Arizona and Ohio, and across Europe. And it jump-started its foundry ambitions recently, announcing the purchase of third-party foundry Tower Semiconductor for $5.4 billion.

Intel will be spending $27 billion in capital expenditures this year, and will likely ramp those investments over the next few years as it builds out a large manufacturing ecosystem outside of Asia, where most of chip production occurs today. The company will have to raise subsidies from governments to do so, but it seems momentum for legislation will lead it to pass, both in Europe and the U.S.

If I had to bet, I would say Intel pulls it off, but this will be a very expensive undertaking, and the payoff won't be for years. Still, it appears Gelsinger and new chief financial officer David Zinsner are believers: Each bought around $250,000 worth of stock on the open market last week after the market swooned. Intel now trades at just 7.4 times earnings, so if its investments pay off, that could be a huge boon for investors two to three years from now.