Sure you can - so long as you do it carefully & get it up to temperature right the way through before eating.
If you ever buy frozen cottage pie, lasagne, anything like that from the supermarket which cannot be stirred whilst heating, then the instructions will allow for that in the heating time & temperature.
If you have a food thermometer, all well & good. If not and you're uncertain, err on the side of caution. My usual trick for anything I need to heat through without poking big holes in to test it is to heat at about 160°C [or even lower, 140°, if it's particularly large] for 'at least 15 mins longer than you think'. This is going to depend on depth & overall size - supermarket products tend to be quite shallow to aid heating through, but for a 'family-size' home made I'd be looking at something like 40 - 50 minutes, hence the lower temperature. You don't want the outside to burn before the inside is heated.
Partially-heating is potentially very unsafe, so until you develop a feel for this, you really are going to have to poke holes in the middle to be absolutely certain it's hot right through.