For a team as big as Bayern who have experience in the Champions League, it's not something to worry about, they lost in the first leg.
Moreover, Bayern only lost by one goal on aggregate, that's something that Bayern are used to. It is very likely that Bayern will win
by a big score when playing in the second leg, like you said the second leg Bayern has the advantage of playing at home.
We are not worried about Bayern, just surprised why they were defeated by Villareal. Bayern is superior in many aspects such as players' quality, experience in UCL, game stats, and other else. It was an unexpected result to see Bayern lose 0-1 in the Leg 1. I assume all football fans must predict that Bayern will be easy to win both in Leg 1 and Leg 2. But in reality, Bayern seems to have difficulties in scoring, even 1 goal only.
Let's see how Bayern bounces back in the Leg 2. They must use a different strategy and play more aggressively. If they use the same strategy as in the previous match, it isn't impossible if Bayern can be eliminated by a Spanish team, Villareal. Spanish team always gives a tight match in international competition, Bayern shouldn't underestimate them.