On the physics side, any physics degree is going to be largely the same in terms of core content, whether the degree is in "physics", "theoretical physics", "astrophysics" etc. That's because to be any kind of physicist you really need to cover all the same essential material in mechanics, EM, QM, thermodynamics and statistical physics, solid state/condensed matter physics, some astrophysics, etc. So you don't need to be too concerned with whether the eventual degree says "astrophysics" or "physics" because a lot of it is going to be the same anyway; usually those with more specific degree titles just make what would normally be certain optional modules into core modules instead (for astrophysics, in astrophysics topics for example). Theoretical physics courses sometimes are slightly different in that they may reduce the amount of lab work you do to add in extra mathematical modules and "theoretical physics" modules (which are usually just extensions of what you would study otherwise and often available as options anyway).
For engineering it should be noted that a) engineering itself is very, very different from physics and b) the different engineering disciplines can often be very different from each other, unlike the different "variants" of physics. There is a world of difference between a chemical engineering degree and an EE course. In terms of differences from physics, a lot of the material in a physics course just won't be covered in an engineering course; it would be extremely uncommon to learn any quantum mechanics beyond oblique references in semiconductor electronics or materials science type modules. You probably wouldn't do any statistical mechanics "proper" except in a chemical engineering degree or perhaps some materials science courses either, although thermodynamics is pretty standard in many engineering disciplines. You won't be likely to do any kind of EM wave content outside of an EE course and probably little work on electricity and magnetism in general otherwise outside of materials science as well as EE.
Additionally the nature of how they teach otherwise seemingly "shared" topics will be a bit different; the physics perspective will generally be a bit more "fundamental" and less applied, focusing more on general cases and the theoretical underpinnings rather than specific applications or solutions. For example, you would probably learn about maxwells equations in general in a physics course and learn the full derivation of them, but in an EE course you may just be introduced to the equations and then focus on applying them to particular problems (e.g. coax cables). Likewise while in physics you would probably approach mechanics from a much more generalised perspective, focusing on idealised point particles and modelling things as frictionless spheres and so on, in an engineering course you would probably be focusing more on particular problems and realising that you can't actually make those kinds of assumptions in those types of problems. There is also engineering design (which is not product design and does not focus on aesthetic elements, but on applying engineering sciences to design some actually functional system, rather than just a purely theoretical model of one) which is of course not present in a physics course at all.
That said there are some engineering courses which may be "closer" to physics than others; generally EE and materials science have more overlap with the core physics topics, and sometimes these courses may be used as a background to go on to do a masters degree in physics (I believe both Imperial and UCL physics MSc courses accept a background in EE, and I think one or the other also considers people with a materials science background). The rare nuclear engineering also has a lot of overlap with physics, unsurprisingly. There are a couple of degrees in the UK in "engineering physics" I believe as well (I think Loughborough offers one).
It may also be possible in some unis to take optional modules in physics while on an engineering degree, although usually engineering degrees have very limited opportunities to take optional modules at all due to needing to cover a large amount of background to meet the requirements for accreditation, and also often those accreditation requirements limit how many optional modules someone on the degree can take outside of engineering. Generally speaking though, it's easier to go from a physics degree to a career in engineering, than to go from an engineering degree to an academic career (i.e. PhD onwards) in physics.