Look for another job, but do not present it to your employer.
I think you should always be interviewing. See what you're worth, see what the climate is like, hone your interviewing skills for the next time you *need* to interview, and maybe get a better offer at a more interesting place.
But never ever present any kind of alternate offer to your manager, or let them know you've interviewed. This is equivalent to asking them to beat a counteroffer, and this will almost always end in disaster.
Best case scenario: You get the raise, but the next time there are general raises you will be passed over. After all, you already got your raise.
Middle case scenario: You don't get your raise. If the threat was idle then you stay where you were at the pay you had, but there will be general resentment. You will get to work on less interesting things and your opinion will be less heard. You will be sidelined in your role because you were even considering looking outside the company. Eventually you'll want to leave anyway.
Worst case scenario: Your company will match or even beat the offer. They will spend the next couple months pairing you with other engineers who will quietly learn what you're doing, and then once the other position has been rejected and filled you will get laid off. Or fired for cause. It isn't hard to engineer enough to argue that, and even if you're fired without cause unemployment doesn't go very far.
If your company needs to spend months costing the salary of an employee making 15% less to save that 15% that is something unheard of. You might be looked at as someone who will jump ship.
What is interesting work changes from person to person. No one is going to take away your interesting work.
It's not about saving that 15%. You've already demonstrated the will to leave the company. If they don't train someone up on your responsibilities then they're likely to left holding the bag. Add in a touch of spite and there you go.
And I agree about interesting work, but al of people work in an environment where they don't get to directly choose what you work on. And it's easy to stick someone on bug triage or perpetual on-call during office hours to sap their will to stay.
I think you should always be interviewing. See what you're worth, see what the climate is like, hone your interviewing skills for the next time you *need* to interview, and maybe get a better offer at a more interesting place.
But never ever present any kind of alternate offer to your manager, or let them know you've interviewed. This is equivalent to asking them to beat a counteroffer, and this will almost always end in disaster.
Best case scenario: You get the raise, but the next time there are general raises you will be passed over. After all, you already got your raise.
Middle case scenario: You don't get your raise. If the threat was idle then you stay where you were at the pay you had, but there will be general resentment. You will get to work on less interesting things and your opinion will be less heard. You will be sidelined in your role because you were even considering looking outside the company. Eventually you'll want to leave anyway.
Worst case scenario: Your company will match or even beat the offer. They will spend the next couple months pairing you with other engineers who will quietly learn what you're doing, and then once the other position has been rejected and filled you will get laid off. Or fired for cause. It isn't hard to engineer enough to argue that, and even if you're fired without cause unemployment doesn't go very far.