They seem to me to be idioms that have the same meaning but are used in slightly different situations.
"On mind" is used in expressions such as "What's on your mind?" or "I've got you on my mind."
On the other hand, "in mind" is used in "Did you have something in mind?" or "I'll keep you in mind."
Based on these examples, "on mind" seems to be used chiefly when you have something between "on" and "mind." But "in mind" can also be used like that, in the case of something like "In my mind, I imagined that you'd like the gift a lot more."
So, "on mind" is when something is "on your/my/etc mind." "In mind" can be both. (Although I fail to think of a situation where someone would say "In your mind.")
Longman Dictionary of Contemporary English also has "on mind" to be written as "on your/somebody's mind."
on your/somebody’s mind
a) if something is on your mind, you keep thinking or worrying about it
He looked as though he had something on his mind.
Sorry I forgot. I’ve got a lot on my mind (=a lot of problems to worry about) at the moment.
b) if something is on your mind, that is what you are thinking about
She’s the type of person who just says what’s on her mind
Merriam Webster Dictionary writes "in mind" to be "to have (someone or something) in mind."
have (someone or something) in mind - idiom
: to be thinking of (someone or something): such as
1 : to be thinking of choosing (someone) for a job, position, etc.
They have you in mind for the job.
2 : to be thinking of doing (something)
"I'd like to do something special for our anniversary." "What sort of thing did you have in mind?"