It sounds like two measurements are needed:
1) Perception of competence. This could be measured using self-report for large studies, or semi-structured interviews for individuals or small samples. For example, individuals could use semantic differential scales to rate global or specific aspects of quality at characteristics or tasks that are key to that activity.
2) Objective measurement of competence. This will be specific to the domain. I work in science, and there are increasing (although flawed) metrics to measure quality such as the H-index for publishing impact. One could also use a basket of other measures, and they could include subjective input like peer ratings. Similar studies have been run in personality psychology.
In an individual, it would be difficult to know whether an observed difference between 1) and 2) is meaningful (e.g., not due to chance). This would be easier in populations, where two distributions could be compared using a method like correlation.
On a less methodological note, many beliefs about the self are not strictly accurate. A general summary is that most beliefs about the self are MORE positive than they should be: https://en.wikipedia.org/wiki/Illusory_superiority However, people seem to underrate their abilities for rare tasks: https://en.wikipedia.org/wiki/Worse-than-average_effect
The original post mentioned scamming others into a belief. Keep in mind that some qualities don't have precise scientific content, or are defined in a huge amount of conflicting ways (e.g., "leadership"), and so it would be difficult to objectively verify. That is, the imposter syndrome will be easier to verify for specific, concrete tasks and well-studied abilities (including intelligence).