This artifact is called staircaising or the jaggies. It is quite annoying but impossible to avoid.
Stating the obvious: JPEG is a format designed to represent images using a matrix of pixels with parallel rows of pixels, very much like and Eth-a-Sketch toy tablet.

Since the rows and the columns are always perpendicular, the JPEG encoding algorithm cannot encode diagonals directly but can only imitate them by rendering ladders and selecting colours that might fool our eyes into thinking we are looking at a smooth diagonal.
The effect looks fine when looked at the right magnification and from the right distance. So when you export the JPEG at 300dpi, the algorithm assumes it will be consumed at 300dpi and does the best it can to render a smooth diagonal. If you go ahead and zoom on it then you are not consuming it at 300dpi but at a higher resolution so the artifact becomes evident.
Notice that the displays do exactly the same in order to render diagonals. We just don't notice it (anymore) because the resolution of displays is higher than what our eyes can see accurately. If you open your PDF and look at your display with a magnifier, though, you will notice the rendering algorithm of your display is using staircasing as well, even to render your crisp PDF.
So, my points are,
- If you need to export your file as a JPEG, then you need to export it at the resolution it will be consumed.
- Don't get flustered if you go and zoom on it and find staircases. They will always be there. The file is just not designed to be consumed at that resolution.
For printing, the general guideline is to provide images with a DPI that is 1.5x to 2 times the LPI of the press. For example, if the press is 150LPI, the images should be 300DPI. The combination of both rendering methods (JPEG and printer screens) will produce smoother results this way.
You can read the explanation for this guideline at the end of my answer to this other question.
Will increasing the dpi of my image (without re-sampling) hurt print quality?