I disagree with the general sentiment in the comments that the only solution is to stick to one genre - you just have to know what you're doing.
The biggest problems with an abrupt, late-game genre switch are with execution and expectations. In terms of execution, making a good game is hard, and making two good games stitched back-to-back is harder. That's where games like Spore fall apart. And in terms of expectations, entirely changing the rules of the game can break the "contract" between the player and the designer that the player agrees on when starting the game. If you can confidently execute on both a horror game and a DOOM-like shooter, and make it clear to the player that the rules of the game are subject to change, you can absolutely get away with making a game like this.
"How to make a good horror game" and "how to make a good shooter game" are both massive questions, too big to address here. But we can look to other games that switch genres (for certain definitions of genre) for clues on how to manage the "expectations" half of the issue:
The entire contracts of minigame-based games like Mario Party are built around genre switches - you know from the beginning that that's what you're getting into. Those games solve the execution problem by breaking each style of gameplay into manageable 1-3 minute chunks.
In the horror space, the Dread X collections do something similar, but with larger and more linear sub-games. Like Mario Party, the different genres are unified by a grander logic - if you can couple the horror and shooter portions of your game using some deeper intricacies of your game design, the switch will feel much more natural.
Undertale is a great example of a game that doesn't advertise its genre switches - instead, it's able to get away with them by constantly poking at and playing with the tropes of (J)RPGs. Like its spiritual predecessors, it makes that kind of postmodern rule-breaking part of the player contract.
Something that all three examples do well is maintain a sort of emotional logic through their genre switches - chaotic fun in Mario Party, mysterious horror in Dread X, subversive sentimentality in Undertale. In your case, that might be the (a)symmetry between the powerlessness of the horror segment and the power fantasy of the DOOM-shooter segment. That has to be handled with care to avoid tonal whiplash, but I'd argue it's the most interesting part of the game idea.
So, say you make a terrifying and tense horror game and end it with the euphoria of absolutely sticking it to the monster in a storm of guts and glory, and telegraph it well-enough that it feels earned. You still won't get people to play both parts of your game if they only enjoy shooting and hate horror, or vice versa. That's ok - not every game can be or should be for everyone. You're better off making a game that's a smash hit with your core audience than a game that everyone thinks is just OK at best, especially at indie scale where word of mouth can make or break you. (But you might be able to get away with meh if you have the marketing budget of a triple-A company.)
That said, the intersection of players in the genres you're working with may or may not be big enough for you to be able to hit your financial goals with the game. That's a calculation you'll have to make.