Almosts any aircraft can sort of fly inverted, but most aircraft cannot maintain inverted flight.
I say 'sort of fly inverted' because unless the engine oil and fuel system is made for inverted flight then you very quickly lose engine power due to fuel starvation when the fuel pickups start sucking air. The fuel pickup points are always at the bottom of the tank, which becomes the top of the tank when inverted.
Same goes for the oil system. Once the oil pickup sucks air the engine self destructs in a minute or two.
Aircraft made for inverted flight have drop valves in the oil pickup line which redirects the pickup point to the gravity side of the oil reservoir. Various systems exist to maintain the fuel supply.
Also, I say 'almost any aircraft' because some aircraft simply refuse to roll over on their back, probably due to excessive inbuilt natural stability and a lack of sufficient aileron control to overcome this. The old Moth Minor was one of them. They were almost impossible to roll on their back. Probably just as well too, because their wings had a bad habit of falling off.

Yes. Off. Right Off.

So, can an airliner fly upside down?
If you don't mind stuffing up the engines, or if they are stuffed anyway, and the aileron control is sufficient to overcome the inbuilt stability, then yes.
The other question is then, can it maintain inverted flight in a descent once the engines have carked it?
Probably yes, so long as the wings are clean (no flaps lowered or slots open) and you maintain a rapid descent rate.
The wings are a reasonably symetrical profile and should generate lift while inverted, but at a higher airspeed.
However, I think it is impossible that you could maintain level flight, inverted and at low altitude in an airliner and recover to level flight before you hit the ground. The act of rolling back to level flight gobbles up lots of power, airspeed and/or altitude.