You will need to wrap your file argument in quotation marks else mspaint will think you're trying to supply 3 arguments separated by a space. Try this:
Get-ChildItem -LiteralPath $kansio -filter "*.jpg" | foreach{
$file = $_.fullname
$id = (Start-process mspaint """$file""" -ea 0 -PassThru).Id