It is the same way necessary as having your passwords stored in plain-text to verify your password.
Name and DOB could be hashed and compared to the hash inside the QR code.
Name and DOB could be hashed and compared to the hash inside the QR code.
There may be variations between different documents (e.g. it might exclude middle names, people might use a different name on different documents, accented characters, hyphens, might be in a different order, might have a title or honorific such as "MR").
Otherwise, there is a large degree of normalisation in the id documents in the EU, and you could simply hash each variation.