You can get a decent setup for 400ish. At that price, you aren’t going to get a good fork…but you should aim for a 9speed group so that you don’t have to convert later. Sub 350 bikes will come with an 8sp (alivio/acera) group mated to Deore 9sp derailleurs. The fork can always be upgraded later, so can disc brakes and all the other goodies.
Honestly, just go out to a few shops and test ride a few models in your price range. At that price point any maker is going to spec the bike with very similar parts, so they compete very well. Ignore the name on the frame, but pay attention to frame geometry. Some companies favor long top tube and lax head tube angles (good for descending) other like steep angles and shorter sloping top tubes (better for cross country and climbing). Pick whatever bike fits your riding style and body shape. Deal with parts later after you’ve ridden it a bit.