If you can buy high-quality dividend stocks when other investors sour on them, you can plant the seeds for robust returns in the future. And that's exactly why it might be worth buying shares of AbbVie (ABBV -4.58%) like it's about to go out of style.

Despite its fully expected, yet ultimately abysmal, first-quarter earnings, the 1% total return of its shares over the last 12 months is still above and beyond the 4% loss for the SPDR S&P 500 ETF Trust, the ETF tracking the S&P 500 index. Few other players could see their earnings evaporate and still outperform the overall market. Here's why AbbVie can do it, and why it could be a smart investment for long-term holding.

Why you should consider investing in AbbVie

AbbVie is one of the world's pharmaceutical leaders, and that's one of the core reasons that it's a relatively safe dividend stock. Its forward dividend yield is currently in the ballpark of 4%, which is higher than that of many of its big pharma competitors. Over the last five years, its dividend has risen by 54%, and management is keen to keep the good times rolling.

To accomplish that, the company will keep doing what it's good at. First, it develops new medicines and commercializes them. Then it spends heavily on follow-on research and development (R&D) to commercialize those medicines for additional indications, squeezing even more revenue out of them. It expects to bring in at least $32 billion in new revenue between now and 2030: more than $21 billion from its immunology segment, more than $9 billion from its aesthetics segment, and at least $2 billion from its neuroscience division. For reference, its top line in 2022 was $58 billion, so there's plenty of growth to come.

But AbbVie's growth is expected to be on the slower side for 2023 and 2024, as some of its older oncology and immunology medicines lose their manufacturing exclusivity and competitors step in to steal market share with generics. That process has already started, as shown in its uncharacteristically disastrous Q1 earnings: Diluted earnings per share (EPS) crashed by 95% year over year, reaching $0.13 on a non-adjusted basis. The good news is that another steep drop is extremely unlikely as the market has most likely factored in future visibility until earnings recover.

Management is banking on the recovery starting mid-decade and picking up steam through the end of the 2020s. As AbbVie commercializes new moneymakers, there's a high chance that profitable growth will return at a consistent pace. And in the meantime, it'll keep paying out its dividend and buying back shares so that investors get some of the benefit of cash flow from its existing portfolio. So for long-term oriented investors, this stock's temporary doldrums are a great opportunity to buy.

Stay abreast of this new risk

Though AbbVie is likely to continue advancing its pipeline and bringing new medicines to the market, it faces a new risk that's likely to be in the headlines on and off over the coming quarters, and perhaps even years.

Per new regulations contained in the Inflation Reduction Act, the Centers for Medicare & Medicaid Services (CMS) can levy a fine against pharmaceutical businesses that hike the prices of certain medicines faster than the rate of inflation. AbbVie, a habitual price-hiker that's been singled out by Congress on several occasions, is already on the list of bio-pharmaceutical companies that have run afoul of the rule -- thanks to increasing the price for Humira, its best-selling arthritic drug. That means it'll need to pay back CMS an unspecified amount, by an unspecified deadline, after going through a newly created and somewhat ambiguous regulatory appeals process. What's more, it could be at least a few months before there's any additional clarity on the entire affair.

Investors should expect that AbbVie will need to cough up fines to satisfy the government at some point in the next few years, but the new regulations are unlikely to be so burdensome that they seriously disrupt the company's ability to continue to grow and pay out excess capital to its shareholders. Plus, once there's more information about how to avoid running afoul of regulations in the future, management can change its pricing strategy accordingly, and the issue will (probably) fade from the stock's most pressing set of risks. So in the long term, the new regulations aren't likely to be a significant competitive factor, as AbbVie's competitors will need to play by the same rules.

So if you're considering a purchase of this stock, now's a good time to invest. The longer you wait, the more dividend income you'll likely miss out on, and there's little in the way of upcoming headwinds that might threaten AbbVie's merit as an investment. It probably won't outperform the market in 2023. But by the end of the decade, its new drivers of growth will be online and humming, and people who bought in now could be significantly richer.