Database

[{"_id":1,"parent":{"fred":1,"notFred":"barney"}},{"_id":2,"parent":{"Fred":1,"notFred":"barney"}},{"_id":3,"parent":{"FRED":1,"notFred":"barney"}},{"_id":4,"parent":{"FrEd":1,"notFred":"barney"}},{"_id":5,"parent":{"freD":1,"notFred":"barney"}},{"_id":6,"parent":{"barney":1,"notFred":"barney"}},{"_id":7},{"_id":8,"parent":42}]

Query

db.collection.find({"$expr":{"$cond":[/** is parent present and an object?*/{"$eq":[{"$type":"$parent"},"object"]},/** yes*/{"$in":[/** lowercase your variable value*/"fred",{/** make array of all lowercased field names*/"$map":{"input":{"$objectToArray":"$parent"},"in":{"$toLower":"$$this.k"}}}]},/** no*/false]}})

Result