The correct phrase depends on where you are and what style you're using. In American English, "learned" is the standard past tense and past participle of "learn," so you'd say "lesson learned."
In British English, both "learnt" and "learned" are acceptable, though "learnt" is more common in informal contexts, and "learned" is often preferred in formal writing. So, "lesson learnt" is fine in the UK, especially in casual use, but "lesson learned" is the safer bet globally, especially in the US.
If you're asking for a definitive rule, there isn’t one that’s universal—it’s a regional preference. Pick based on your audience: "learned" for American readers, "learnt" if you’re leaning into British vibes. Either way, people will get it. Context won’t collapse over a "t."