It's definitely not based on deaths, that would be a weird mechanic. Enemies always seemed to unlock in a similar way that everything else unlocked for me, i.e. once you've encountered or scanned something for the first time, it has a chance of appearing where it previously didn't. That's why, on average, you will see an increase in enemy numbers and variety the longer you play the game. Certain milestones such as reaching the next biome might also increase earlier biome difficulty, can't really say with any certainty.
Boss difficulty always remained identical for me though, it's just the perceived difficulty that varies based on your loadout. For some reason, despite often struggling and taking multiple attempts to reach bosses, I never once died to a boss until I cleared the game. I found them minor obstacles on the path to the next biome, while the real difficulty was just the rest of the game.