To be fair to the Federation, Starfleet is no stranger to wild shit like random energy beings that are fascinated by the idea of the concept of death, or anomalies that catapult you through time, or parasitic/shapeshifting alien infiltrators (that I would hope that by now they're keeping a closer eye out for). Trek's home setting could be considered a death universe on its own, simply due to how much weird shit tries to kill the ship/a random every week. The number of ships and planets the Enterprise (I'm assuming ~TNG era, but any version will do) encounters that have randomly exploded/been depopulated/whatever suggests this isn't that unusual an occurrence. Unlike the Imperium, their preferred response is to do science to it, rather than mark 'here be heresy' on a map and shoot anyone who gets curious. The fact they still know the basic principles behind their scientific and industrial base is a massive help in this regard.
Sentient black hole trying to eat the ship again?
Imperium: Perform the ritual the Magos claims he knows how to perform that has something to with the holy vibrations of the gravity generator. Will it work? No idea, but it has the same sentence in the title as the one the cogitators spat out when describing the heretical anomaly.
Starfleet: Invert the quantum waveform of the main deflector's graviton emitter and run a plasma charge through the nacelles, then divert tachyons from the event horizon itself. Once the resulting subspace membrane dissipates, we should be in the clear. Or the ship will explode, but the Enterprise is the closest ship in the sector and I'm sure they'll figure out what happened just in time for it to not happen to them.
This attitude will prove detrimental when they try and analyse those weird symbols they found that seem to move when you look at them out of the corner of your eye. Maybe Troi will finally do something useful and explode in time to warn them to stop.
The main issue for basic survival is that while Starfleet is used to dealing with this shit, the Federation as a whole is not and it's anyone's guess how easily these things could slip through. There will be a nasty adjustment period for the civilian side while everyone figures out how to keep the universe from eating them (more than is usually tries to, anyway).
The problems begin if/when one of the neighbours take notice. A major Ork waaagh would have enough firepower to gut starfleet and its crude enough that there probably isn't a way to technobabble out of it (no-one seems to use psychic tech, so I'd assume supressing the waaagh is a non-starter). Betazoids/all reasonably potent telepaths are probably fucked too. Not 'new Eye of Terror' level, but a constant, slow buring Chaos infestation that even General Order 24 doesn't fully solve might occur, since the Federation won't have attitude needed to stop things snowballing until they've had their noses rubbed in it.
Basically, the neighbours and the warp are the big problem. The galaxy is a big place, so if they can avoid attention (local minor xenos might be manageable) and manage to keep a lid on psychic activities, they might be able to buy the time needed to adjust. How much time will be needed and what it will cost them is the main question.
The Main threat will be the Imperium finding them. Not only are they flagrantly consorting with xenos (worthy of death all by itself), they're humans being successful while not part of the Imperium. That last part is a threat to their legitimacy and that will not be tolerated by the Imperium as a whole, even as an alliance of convenience. Local commanders might grit their teeth and work with the xeno-lovers, but once word starts to spread expect a crusade.
Mirror universe Terran Empire might get along with the Imperium thanks to not being xeno-lovers. They still work with them, but once it becomes politically inconvenient they can be disposed of. Their problem will be keeping the latest would-be Terran Emperor (I hope for their sake that title doesn't translate to Gothic literally) from trying to consort with Chaos to get the power needed to rule. The Imperium will get sick of their backstabbing eventually, but they should at least be able to work with them for a while, as long as it looks like they're being incorporated into the Imperium. If it looks like they aren't going to join? Crusade time.