My question is prompted by the Air India crash.
If the flaps are not used on takeoff how is the lift of the wing affected?
They're always going to be used to some extent. Generally the lowest setting gives you slats only. The next couple will give area increase at the trailing edge, and perhaps some rear curvature. After that the curvature increases dramatically, and they produce a lot more drag. These draggy settings are never used for takeoff, only landing, and in the event of a go-around, the flap is retracted away from them immediately.
With lower flap settings, you need to be going faster to produce the same lift. They're used on long runways mostly, where effectively you do your accelerating on the ground before getting airborne.
If there is an engine failure the other engine is strong enough to lift the plane.
The engines never lift the plane. All they do is push it forward. As long as you've got at least as much forward thrust as you have drag, you'll be able to maintain any speed. Add a little more thrust and you can accelerate.
Can the engines provide enough power to overcome the lack of lift if the wings are not correctly configured?
As long as the aircraft is above the stall speed, the engines should be able to accelerate it. If it you don't have enough power, then you may have to trade altitude for speed, which isn't something that's always possible.
To give you an idea of stall speeds (this is the 767-300 @ at its maximum takeoff weight):
Clean 188 kts
Flap 1 (slats) 155 kts
Flap 5 (slats and trailing edge area increase) 142 kts
Flap 20 (slats, trailing edge, and some curvature) 137 knots
Flap 30 (slats, trailing edge, and lots of curve) 127 knots
If the aircraft is incorrectly configured, the degree of error would matter. Flap 5 instead of 20 would be barely noticeable. Clean instead of 20, and it wouldn't get airborne, or if it did, it wouldn't be for long. Takeoff configuration warnings simply go mad with no flap, but they'd probably allow the wrong one, as long as it's a defined takeoff setting (i.e. not 30). I don't believe they took off without flap. One possible action has the non flying pilot retracting the flaps, instead of the gear after take off. The flap lever has a very solid gate, designed to make this sort of error difficult, but assuming you got past that, the aircraft itself would refuse to retract the leading edge devices (called auto gap on the 787). So, my feeling is that you'd still be in a situation the aircraft could fly away from.