There are some good deals out there for investors heading into 2023. The 2022 bear market crushed some stocks and their valuations, creating some attractive buying opportunities as result.

A couple of stocks that struggled this year that investors should consider taking a contrarian position in today include Walgreens Boots Alliance (WBA -0.93%) and Adobe (ADBE 1.29%). Here's why these two stocks can turn things around in 2023 and do better than expected.

1. Walgreens Boots Alliance

Share prices of retailing pharmacist Walgreens are down 22% so far in 2022, performing worse than the S&P 500 index and its 17% loss over the same time frame. There simply hasn't been much excitement around a business that operates on small profit margins and is facing tough year-over-year comparisons because it got a boost from increased customer traffic related to COVID-19 vaccinations in the past few years.

But investors shouldn't be so quick to write the company off. There are a couple of catalysts that could make 2023 a rebound year for the business. The first one is another rise of COVID-19 cases as well as growing concerns around increased cases of the respiratory syncytial virus (RSV) among children and seniors this fall. Pfizer is working on a vaccine for RSV and recently released encouraging results from phase 3 trials. It plans to submit a Biologics License Application by the end of this year, and it may only be a matter of time before an RSV vaccine becomes available. For Walgreens, this means there could be significant demand for vaccinations next year, and it may again play a key part in administering those vaccines. If it does, its stores could see better-than-expected foot traffic, leading to stronger sales in the process.

Another catalyst is the company's growing expansion into healthcare. Walgreens invested in primary care company VillageMD and the two have launched 342 clinics already, with plans to open hundreds more in the years ahead. Its new U.S. Healthcare segment generated $1.8 billion in sales for fiscal 2022 (year ending Aug. 31), and Walgreens anticipates that by fiscal 2025, that number could swell to $12 billion.

Between the growth expected in its healthcare segment and the possibility of an upswing in traffic next year, 2023 could end up being a surprisingly strong year for Walgreens. The stock is trading at only 8 times earnings right now and could be a steal of a deal.

2. Adobe

It's been a tough year for tech stocks and Adobe is no exception, nosediving roughly 43% thus far. But a sell-off was likely inevitable at the start of 2022; shares of the company were trading at more than 50 times its trailing profits. Investors also weren't that keen on Adobe's expensive $20 billion acquisition of Figma, a start-up company that offers web-based design tools. Plus, Adobe's growth rate has been slowing down for a while:

ADBE Revenue (Quarterly YoY Growth) Chart

ADBE Revenue (Quarterly YoY Growth) data by YCharts

But I can see a turnaround for Adobe's stock next year. That's because the company benefits from having a customer base that is accustomed to paying a premium for its products, not unlike tech giant Apple. For example, to access Adobe's suite of Creative Cloud applications, which includes popular programs such as Photoshop and Illustrator, consumers are paying as much as $82 per month. By comparison, Microsoft offers its whole suite of office products, which are essential for most office workers, plus cloud storage, for just $70 -- and that's for an entire year.

Adobe's products aren't cheap, and by adding Figma into the mix, there could be more opportunities for Adobe to upsell and enhance the packages it already offers consumers. With a customer base that doesn't look to be too sensitive with respect to prices, Adobe could make for an underrated buy heading into next year as the business may perform better than other tech companies amid inflation and an economic downturn. Over the nine-month period ending Sept. 2, the company's sales have totaled $13.1 billion and are up 12% year over year.

Now that the stock is at a more tenable price-to-earnings multiple of about 30, which is around the lowest levels it has been in years, it could be an optimal time to buy shares of Adobe.