No, it does not need to match. I have a UK EHIC card (bound to my insurance as a UK resident) and have a passport of another EU state, that is totally fine and worked well so far. As you can see in the terms of how to apply, you can apply for an EHIC card as a national of the UK, EEA and Switzerland. All what counts is your proof of residency.
(That concerned the first version of the question): However, in case the UK leaves the EU completely and without health insurance agreements between the EU and UK being in place, you need (as a UK resident) to take care of your insurance matters yourself (for getting emergency treatments in EU countries).