PhD Perfect fit topic + insecure funds vs. non-optimal topic + secure funds
If you are anything like the numerous phd students before you, myself included, your interests are very likely to change as you are exposed to different ideas from new colleagues. 

The Helmholtz position sounds like a great place to do a PhD. Firstly, you get funding. That is important. Secondly, you get a large group of colleagues where you will be exposed to new ideas and ways of doing things. You might find that your knowledge of things like gradient descent and differential equations fits perfectly with machine learning. You might discover you have a love for programming when scripting simulations. 
You might even be like a friend who decided to leave theoretical physics and pursue finance in New York. 

And there is nothing to stop you from pursuing your interests during your phd career or even in a postdoc. 

As for your post-doc position, it depends on the position. Sometimes a PI wants a post doc with a very specific set of skills and knowledge. Sometimes a PI wants a post doc with a lot of potential who is also hungry and hard working. Sometimes a PI wants a post doc with a proven research production stream.