I know next to nothing about repair costs.
I will say this. I have a 2017 Legacy, V6, and I love it. The new Subarus if you choose to get one, have the Turbo 4 cylinder and car buffs that I know say the 6 cylinder has more kick than the current turbos. The tell me that the Turbo 4's have an initial quick kick and then flat out after a short while meaning if you put your foot to the pedal, you don't get that quick acceleration that you got from a stop. My sister has a Mercedes SUV, turbo 4 and I experience the quick start from a stop, and then while driving and accelerating, it flat lined and did not give that kick anymore.
I delay my point. You have a car with a capacity for maybe 250,000 miles and you are worrying about the repair costs? Of course, get second opinions, but the dealers do have computer diagnostics and are factory trained.
You buy a new car of any sort, you have higher insurance costs, higher car property taxes, and of course, the sales tax on the new car. Never mind the depreciation after it leaves the lot.
It is your choice. I plan on keeping mine for a while. I love its ride. I have owned a Camry before, and I loved it, but the ride on the Subaru and its all wheel drive sold me and continues to sell me.
Pay to fix the car and keep it for years to come , would be my recommendation.