TL;DR: Sure, "do your own homework" is sometimes a cop out. But that doesn't mean we shouldn't do our homework.
I agree that in many cases this is a cop-out by commentators. However, even if you believe in perfect market efficiency, there is benefit in "doing your homework" for many reasons. One of which you already mention in the question: different stocks all with the same "value" might have widely ranging risk. Another factor that might vary between stocks is their tax consequences. High dividend stocks might be a better fit for some buyers than others.
One stock might be priced at $40 because there is a small chance they might get regulatory approval for a new product. This might make this stock very risky with a 20% of being $150 in 12 months, and a 80% chance of being $20.
Another stock might be priced at $40 because the company is a cash cow, declining in revenues but producing a large dividend of $0.40 per quarter. Low risk, but also with some potential tax disadvantages.
Another stock might be priced at $40 because it's a high growth stock. This would be less risky than the first example, but more risky than the second example. And the risk would be more generalized, i.e. there wouldn't be one day or one event that would be make or break the stock.
In short, even if we assume that the market is pricing everything perfectly, not all stocks are equal and not all stocks are equally appropriate to everyone. Sometimes when we hear an analyst say "they should have done their homework" they are really saying "This was a high risk/high reward stock. They should have known that this had a potential downside."
And that all assumes that we believe in 100% pure market efficiency. Which many disagree with, at least to some extent. For example, if we instead subscribe to Peter Lynch's theories about "local knowledge", we might believe that everyone has some personal fields of expertise where they know more than the experts. A professional stock analyst is going to follow many stocks and many not have technical experience in the field of the company. (This is especially true of small and mid cap stocks.) If you happen to be an expert in LED lighting, it is entirely feasible (at least to me) that you could be able to do a better job of "doing homework" on CREE than the analysts. Or if you use a specialized piece of software from a small vendor at work, and you know that the latest version stinks, then you will likely know more than the analyst does.
I think it is somewhat akin to going to a doctor. We could say to ourselves "the doctor is more knowledgeable about me than medicine, I'm just going to do what they tell me to do." And 99% of the time, that is the right thing to do. But if we do our "homework" anyway, and research the symptoms, diagnoses, and drugs ourselves as well, we can do get benefits. Sometimes we just can express our preferences amongst equal solutions. Sometimes we can ask smarter questions. And sometimes we have some piece of knowledge that the doctor doesn't have and can actually make an important discovery they didn't know. (And, just like investing, sometimes we can also have just enough knowledge to be dangerous and do ourselves harm if we go against the advice of the professionals.)