You are misinterpreting the meaning of "notice" in the phase. In the context it means "see". If the players can see something, they can be aware that it is a potential threat - because everything in a dungeon is, and hence not surprised by it. Situationally, the DM might rule that the PCs are unwary, and are surprised. This is the DMs call, which is why the section begins "The DM decides if the party is surprised". If the party are suspicious enough of something to investigate it with spells, pointy sticks or rolled up balls of paper, they are never going to be surprised by it. They are more likely to be surprised if it turns out to be a plain ordinary chest.
No,
you are misinterpreting the meaning of
notice. In context, it has the ordinary, everyday, natural language meaning of "become aware of" found in most dictionaries. This is by sight, hearing, smell, or by any other means, but the important thing is that awareness must be gained thereby for you to have noticed anything. The threat, in this scenario, is a mimic. By seeing the "chest", did the party become aware of a mimic? No, not before it sprouted pseudopods and attacked them!
Look at the ranger's 10th-level ability, Hide in Plain Sight. It allows the ranger to try to hide by pressing themselves up against a solid surface while wearing camouflage. An observer can look right at the exact portion of the surface the ranger is pressing themselves up against and see the camouflage worn by the ranger that looks like part of the surface, but as long as the ranger doesn't move or take actions, and as long as the ranger's Stealth check is successful, the observer is totally unaware of and does not notice the ranger.
And XG clarified this: you can cast it on anything, it just does nothing if you cast it on something that is not a creature.
I'm not sure what your point is. I said the cleric was targeting the mimic. You said the spell isn't "targeted". I said it is because it targets a creature. Now you're saying it can target anything. So?
If the mimic decides it wants to attack initiative is rolled. If the mimic rolls a higher initiative than the cleric it can attack them before they get the spell off.
Initiative is being rolled in any case because the cleric's player decided the cleric wants to attack.
But the cleric is not surprised - they clearly believed the mimic was a threat or they wouldn't have been casting a spell on it in the first instance. If the mimic rolls lower than the cleric, it gets hit by the spell, then it can move.
Surprise has nothing to do with belief. It has to do with awareness, which is knowledge or perception of something, not belief. The cleric doesn't know there's a mimic. The cleric hasn't perceived the mimic. The cleric might believe there's a mimic in the room, but that's irrelevant for the purpose of determining surprise.
That is assuming the cleric isn't hidden from the mimic, or using subtle spell (from the feat). Under those circumstances the mimic is surprised and doesn't get to act on the first round.
Of course all kinds of circumstances that aren't part of the scenario described in the OP would change the outcome of the encounter.