Some file formats (most) don't contain information about how many pixels per inch the image is. Whatever program you use to open those images will assign a PPI value to the file (72 PPI is typical).
If there are layers that extend off the canvas, Export will not work correctly. Hidden areas will appear as part of the exported image. If this is happening, you should flatten the image before exporting, then undo the flatten after.