<p>Say I wanted to print a plastic credit card like shape (like <a href="https://rads.stackoverflow.com/amzn/click/com/B07193KG7G" rel="nofollow noreferrer" rel="nofollow noreferrer">these</a>), but with a QR code engraved. How could I do that for cheap? You can buy an "ID card printer" for $1,000-1,500 on Amazon, but that's way too much for printing one or two cards. Maybe down the road this would be a good option, but I kind of like the option of 3D printing the card from scratch, so the QR code bleeds halfway or all the way through the card, rather than just being printed on the surface. Is this possible for cheap? Maybe like <a href="https://www.library.ucsf.edu/news/3d-print-the-ultimate-business-card/" rel="nofollow noreferrer">this</a> but not as fancy. Mainly (I'm new to all this) I am wondering what machine would accomplish this for low price yet good quality, and what other equipment I would need.</p>

<p>Basically, what printer is best for this type of task?</p>

FDM printer?
If you want to print one, maybe you should outsource it (let it print the tag on both sides), even the most affordable printers are in the \$100 - \$150 price range. If you want a printer and use it also to create ID tags, you could go for an FDM printer. Considering your request of having the tag inside (and through) the ID-card you need a dual filament option (one or two nozzle arrangement). If the tag can sit on top you can print it with a filament change with a single filament single nozzle printer. But, don't expect to get crystal clear prints (see experience printing signs below)!
Alternatives
As an alternative, you could print a blank PLA ID-card and laser mark the tag onto both sides, see e.g.
this video
.
If it is a small batch you can also consider printing/lasering stickers and stick these onto blank ID cards.
From experience
I've done some signs with black letters on a white background for "on-lay", inlay and through arrangements using a more expensive (for home use) dual extruder 3D printer (Ultimaker 3 Extended about \$5000,-) with PETG, but the results were not very satisfying. Usually the black smears out on or in the white no matter tweaking the options. Considering the size of an ID-card, the amount of tag squares, this is even more likely to happen when you print at that small size (the signs I printed were sized similar to the "A5" paper standard).
From my experience I would say that a 3D printer may not be the best solution for your task.