As far as I know, nuclear fission was already understood at the time, so was all the competition between the american team and the german team to develop the bomb first, a mere matter of engineering?
Only some very, very basic knowledge about the physics of nuclear fission was available at this time. I'll give a few details about this below. Also, according to this 1967 interview with Heisenberg, it's probably not accurate to imagine a competition between the US and the Nazis to build a bomb; the Germans were struggling to keep fighting at all in Europe, and didn't think it was realistic to produce more than research reactors given the time and resources they had available.
The liquid drop model dated back to 1935, so physicists, even non-specialists like Einstein, could readily understand the basic idea that fission was possible and that it should release neutrons, making a chain reaction possible. However, fission is a tunneling process, and tunneling depends exponentially on the width and height of the barrier, making it extremely difficult, even today, to calculate fission rates from first principles to even order-of-magnitude precision. People today would typically approach this kind of calculation using the Strutinsky smearing technique, which wasn't invented until 1968 (Strutinsky, Nucl. Phys. A122 (1968) 1; described in http://arxiv.org/abs/1004.0079 ). A primitive version of the nuclear shell model had been proposed, but it wasn't until Maria Goeppert-Mayer in the 50's that it was really developed into a detailed theory, and it only worked for spherical nuclei -- uranium and plutonium are deformed. Even gross features of the barrier, like the existence of a metastable minimum (fission isomers), were not to be discovered until the 60's. So induced fission cross-sections and average neutron multiplicities had to be measured empirically:
[W]hile Glenn Seaborg's team had proven in March 1941 that plutonium underwent neutron-induced fission, it was not known yet if plutonium released secondary neutrons during bombardment. Further, the exact sizes of the "cross sections" of various fissionable substances had yet to be determined in experiments using the various particle accelerators then being shipped to Los Alamos. (source)
The Germans also set themselves back because of Heisenberg's decision to use heavy water as a moderator, when graphite would have been easier. This was apparently partly based on a mistake in a 1940 measurement by Bothe.
There have been lots of hints (possibly involving wishful thinking and retroactive rewriting of history) by the German physicists that they may have dragged their feet or intentionally made mistakes, because they didn't want their own country to get the bomb. The true nature of Heisenberg’s role in the Nazi atomic bomb effort is
a fascinating question, and dramatic enough to have inspired a well-
received 1998 theatrical play, “Copenhagen.” The real story, however,
may never be completely unraveled. Heisenberg was the scientific leader
of the German bomb program up until its cancellation in 1942, when the
German military decided that it was too ambitious a project to undertake
in wartime, and too unlikely to produce results.
Some historians believe that Heisenberg intentionally delayed and obstructed the project because he secretly did not want the Nazis to get
the bomb. Heisenberg’s apologists point out that he never joined the
Nazi party, and was not anti-Semitic. He actively resisted the government’s Deutsche-Physik policy of eliminating supposed Jewish influences from physics, and as a result was denounced by the S.S. as a
traitor, escaping punishment only because Himmler personally declared
him innocent. One strong piece of evidence is a secret message carried
to the U.S. in 1941, by one of the last Jews to escape from Berlin, and
eventually delivered to the chairman of the Uranium Committee, which
was then studying the feasibility of a bomb. The message stated “...that
a large number of German physicists are working intensively on the
problem of the uranium bomb under the direction of Heisenberg, [and]
that Heisenberg himself tries to delay the work as much as possible,
fearing the catastrophic results of success. But he cannot help fulfilling the orders given to him, and if the problem can be solved, it will be
solved probably in the near future. So he gave the advice to us to hurry
up if U.S.A. will not come too late.” The message supports the view that
Heisenberg intentionally misled his government about the bomb’s technical feasibility; German Minister of Armaments Albert Speer wrote that
he was convinced to drop the project after a 1942 meeting with Heisenberg because “the physicists themselves didn’t want to put too much
into it.” Heisenberg also may have warned Danish physicist Niels Bohr
personally in September 1941 about the existence of the Nazi bomb
effort.
On the other side of the debate, critics of Heisenberg say that he clearly
wanted Germany to win the war, that he visited German-occupied territories in a semi-official role, and that he simply may not have been
very good at his job directing the bomb project. On a visit to the occupied Netherlands in 1943, he told a colleague, “Democracy cannot
develop sufficient energy to rule Europe. There are, therefore, only two
alternatives: Germany and Russia. And then a Europe under German
leadership would be the lesser evil.” Cassidy 2000 argues that the
real point of Heisenberg’s meeting with Bohr was to try to convince the
U.S. not to try to build a bomb, so that Germany, possessing a nuclear
monopoly, would defeat the Soviets — this was after the June 1941 entry of the U.S.S.R. into the war, but before the December 1941 Pearl
Harbor attack brought the U.S. in. Bohr apparently considered Heisenberg’s account of the meeting, published after the war was over, to be
inaccurate. The secret 1941 message also has a curious moral passivity to it, as if Heisenberg was saying “I hope you stop me before I do
something bad,” but we should also consider the great risk Heisenberg
would have been running if he actually originated the message.
David C. Cassidy, "A Historical Perspective on Copenhagen," Physics Today,
July 2000, p. 28, http://www.aip.org/pt/vol-53/iss-7/p28.html