In your figure 1 let's define a unit vector $\hat k$ to represent an anticlockwise rotation.
So the angle as drawn is $\theta \hat k$, the angular velocity is $\dot \theta \hat k$ and the angular acceleration is $\ddot \theta \hat k$.
The torque is $mgd \sin \theta \, (-\hat k) = - mgd \sin \theta \, \hat k $ and from that you get your equation $$I\ddot \theta \hat k =- mgd \sin \theta \, \hat k \Rightarrow \ddot \theta =- \dfrac{mgd \sin \theta}{I}$$
In your figure 2 let's define a unit vector $\hat K$ to represent a clockwise rotation.
So the angle as drawn is $\theta (-\hat K)=-\theta \hat K$, the angular velocity is $\dot \theta (-\hat K)=-\dot\theta \hat K$ and the angular acceleration is $\ddot \theta (-\hat K)= - \ddot \theta \hat K$.
The torque is $mgd \sin \theta \, \hat K$ and from that you get your equation $$-I\ddot \theta \hat K =mgd \sin \theta \, \hat K \Rightarrow \ddot \theta =- \dfrac{mgd \sin \theta}{I}$$
If your diagrams were showing the positions at maximum excursion at time equal to zero and the amplitude of the motion was $\Theta$ then for figure 1 the initial angular displacement is $\Theta \hat k$ and that for figure 2 is $\Theta (-\hat K)= -\Theta \hat K$ which is consistent with the fact that $\hat k = -\hat K$.
You would made life easier by usng the mirror image of figure 1 when drawing figure 2 which is the same as looking at the figure 1 pendulum from the other side ie looking at figure 1 from "inside" the computer screen.