The engines are indeed quite different. The A330 (2 engines) is available with several different engine options, but typical power is about 67,500 pounds thrust each, for a total of 135,000 total pounds thrust.
The A340 (4 engines) is currently available with only one engine option, with 22,000 pounds thrust each, for a total of 88,000 pounds thrust.
You may have noticed that the A330 generates about 50% more thrust than the longer range A340. This is because commercial aircraft are designed to operate safely with a single engine failure. You'll notice that if the 2 engine A330 loses one engine, the remaining single engine will produce 67,500 pounds of thrust. Similarly, if the 4 engine A340 loses a single engine, the remaining 3 engines will produce 66,000 pounds of thrust, virtually the same as the 67,500 pounds on the A330.