Whether it’s safe to drive, depends on what is whining.
Generic advise is to get it recovered, but that would depend on what recovery you’ve got, or if you want to pay for it.
Having thought about it a bit more, and given the engine management light has come on, I’d hazard a guess it could be something turbo/boost related, such as a turbo hose blown of/split, which isn’t unknown, especially on the 1.4/1.6 HDIs. If it is then it’ll still be safe to drive, just be totally lacking in power.
A bearing failure in itself won’t bring on the engine management light, unless it’s something directly related to the engine running.