Flick has a contract until the summer of 2024 when Germany host the European championship but a disappointing showing in Qatar had seen his position come under threat.
A 2-1 defeat to Japan, 1-1 draw with Spain and a 4-2 victory over Costa Rica were not enough to secure passage to the round of 16.
This is the second straight edition of FIFA's flagship tournament the 2014 winners have failed to make it out of their group.
As defending champions in Russia four years ago, Germany under Joachim Low, finished bottom of their group, which comprised Sweden, South Korea and Mexico.
This time in Qatar, led by Flick, Germany could only secure third spot behind Japan and Spain.
National team director Oliver Bierhoff resigned in the wake of Germany's elimination in Qatar but Flick's position remains secure after a meeting with DFB president Bernd Neuendorf and vice-president Hans-Joachim Watzke.
"My coaching staff and I are optimistic about the European Championship in our own country," Flick said.
"As a team, we can achieve a lot more than we showed in Qatar. We missed a great opportunity there.
"We will learn our lessons from that. We all want the whole of Germany to gather behind the national team again at the home European Championship in 2024."
Neuendorf added: "We are all convinced that the 2024 European Championship in our own country represents a great opportunity for football in Germany."
"Our goal is to make this tournament a sporting success. We have full confidence in Hansi Flick. He will master this challenge together with his team.
"With regard to Oliver Bierhoff's successor, we have agreed that we will first discuss the future structure of this area of responsibility within the DFB and then make a personnel decision."