Pastry. It's baked after the filling is added so it's technically a pastry. It would only be considered a sandwich if you took 2 precooked thin pastry crusts then added jam or jelly between them without cooking it after.
If you put something in between two pop tarts then it’s a pop tart sandwich. Standing alone it’s a toaster pastry.