A national study has found that earnings over the course of the careers of primary-care physicians averaged as much as $2.8 million less than the earnings of their specialist colleagues, potentially making primary care a less attractive choice for medical school graduates and exacerbating the already significant shortage of medical generalists.