installing cotter pin cranks - pin isn't flush
For a correct installation the top of the pin does not need to be flush with the crank.
The last picture in this how-to article is of a correctly installed pin and it is not flush.
As long as the flats of the pin make correct contact with the spindle and the pin goes through far enough to have threads sticking through the nut it's OK.

Keep in mind, 


  You cannot get a cotter tight enough by tightening the nut: you must use a press or a hammer. Cotters are made of fairly soft steel, so that they won't damage the axle. If you try to tighten them just by turning the nut, either you won't get them tight enough, or you will strip the threads.
  After a cottered crank has been re-assembled, the bicycle should be ridden for a few dozen miles, then the cotter re-tightened with a press or hammer. If this is not done, the cotter will probably loosen up. If the bicycle is ridden with loose cotters, the motion of the crank will cause the axle to cut notches into the cotters, and it will become impossible to tighten them. 
  https://www.sheldonbrown.com/cotters.html