How do I get under shingles to replace the roof edge flashing?
I eventually figured out how to do this on my own. I am posting the answer in case anybody else has the same problem.

The secret to doing this kind of repair or rebuild, as any kind of shingle-related repair, is that you pull up the layer of shingles above the one you are working on. So, in my case, I need to pull out the nails from the last row of shingles (or whatever row is over the flashing) using a nail puller. This will allow me to lift up the shingles and expose the nails holding the old flashing. I then will pull up those nails and remove the old flashing. Next, I lift up the shingles, and attach the new flashing by nailing, screwing (or whatever). Finally, I will nail the upper layer of shingles back in again.