PS2 Classics are PS3 only, the PS4/PS5 versions of PS2 classics are separate products, even from themselves, all 3 have their own distinct product listings if I recall correctly. I have no point of reference regarding PS2 Classics netting you PS4/PS5 versions. (I can confirm that I own Twisted Metal: Black as a PS2 Classic and I do not own the PS4 version and cannot obtain it for free)
PSOne Classics are PS3, PSP, and PSVita, 1 purchase, 1 product listing. Owning PSOne classics that are now available on PS4/PS5 generally allows you to purchase the PS4/PS5 version for free, but you do still have to make a purchase (source: Me "rebuying" Wild Arms 1 + 2 on PS4 and PS5.)
I'm not terribly familiar with PS Minis as I thought they were Vita only.
Referring to some content on PSN, the PSP, PS3, and PS Vita versions were separate products, but they leveraged "cross-buy" which meant by buying one, you owned all. In this situation the user should reasonably add all 3 (PSP, PS Vita, and PS3) to their collection. Some of these games even had separate trophy lists, but I think that was usually ones without cross-saves. In the cases of PS2 Classics, PSOne Classics, and PS Minis, Sony treated these as separate product types from PSP, PS Vita, and PS3 games.
Personally, I'm fine with PS2 Classics going into PSN PS3 because they were only playable on PS3. PSOne classics is complicated because it's not PS3, PSP, nor PS Vita, and they aren't treated differently per platform, but again, owning them doesn't necessarily get you the PS4/PS5 versions, but my sole experience is with Wild Arms. As for PS Mini, I'm not opposed to putting them under PSN PSP, but the fact that some work on PS3 and PS Vita whereas no PSP games are playable on PS3, it irks me a little.