The steps are:
1. Make sure “Use Typographer’s Quotes” is ON in Preferences > Type.
2. Using regular text Find & Change, search for ^'.
3. Change it to '
4. This usually works because ^' looks for *exactly* the ‘straight’ quote, and replacing it with a single straight quote in “Typographer’s Quote” mode makes InDesign kick in its own smart quote replacement.
.. but (surprise surprise!) … in this case it does not work!
Now hold on (I said to myself), I am sure it works. So I changed the font to Times New Roman and it did. Changing the font back to Alegreya Sans made it Not Work.
Inspecting the font itself revealed why: it actually <i>is</i> “an OpenType thing”! In the Standard Ligatures set, Alegreya Sans <b>always</b> replaces the closing quote in a combination closing-quote (any letter) with the Straight Up Quote! This is done with an OpenType feature, and so there is nothing wrong with your attempts or with InDesign – it works “the way the font creator intended”.
[I also discovered a few other strange combinations. Type “<arriba>”, “<square>”, “<izquierda>”, “<ht>” amongst another few phrases, to see what I mean. Also, ~i gets automatically translated to ?, and a few more “tilde” codes.]
The only way to get rid of it is to disable the OpenType Feature that enables it: Ligatures. Now you don’t want to do that for all of your text (there is nothing wrong with its “fi”, “fl”, and other ‘common’ ligatures) so I suggest the following:
1. Make sure “Use Typographer’s Quotes” is ON in Preferences > Type.
2. Using regular text Find & Change, search for '.
3. Change it to ' <i>and</i> make sure “Ligatures” is switched OFF in the Change Format (Basic Formatting) field.