After drawing the axes and annotation objects we get their positions to shrink the axes and move the annotation to the required place. The annotation position is given in display coordinates (after drawing), so we need to convert them to figure coordinates using fig.transFigure.inverted().
In the following example we right-align the annotation to the right figure border and then to the top axes border, therefore I changed the alignments in ax.annotate() accordingly.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.DataFrame({
"a": np.random.uniform(0.0, 1.0, 100),
"b": np.random.uniform(10.0, 14.0, 100),
"c": np.random.uniform(100.0, 1000.0, 100)})
fig, ax = plt.subplots()
ax.scatter(df.b,
df.c,
label='b-c')
ax.legend(loc='best')
trans = ax.get_xaxis_transform()
bbox_props = dict(boxstyle="round,pad=0.5", fc="w", ec="k", lw=2)
ann = ax.annotate('Y = a * x + b + other stuff..',
xy=(1, 1),
xycoords='figure fraction',
bbox=bbox_props,
horizontalalignment='right',
verticalalignment='top',
annotation_clip=False)
fig.canvas.draw()
ax_bbox = ax.get_position()
text_bbox = fig.transFigure.inverted().transform_bbox(ann.get_bbox_patch().get_bbox())
ann_bbox = fig.transFigure.inverted().transform_bbox(ann.get_bbox_patch().get_window_extent())
x_pad = (ann_bbox.width - text_bbox.width) / 2
y_pad = (ann_bbox.height - text_bbox.height) / 2
ann_pad = .02 # padding around annotation box in figure coords
ax.set_position((ax_bbox.x0, ax_bbox.y0, 1 - ann_bbox.width - ax_bbox.x0 - ann_pad, ax_bbox.height))
ann.set_position((1 - ann_pad, ax_bbox.y1 - y_pad))
plt.show()

UPDATE for second annotation as per comment:
...
ann1 = ax.annotate('second annotation',
xy=(1, 1),
xycoords='figure fraction',
bbox=bbox_props,
horizontalalignment='right',
verticalalignment='top',
annotation_clip=False)
fig.canvas.draw()
ax_bbox = ax.get_position()
text_bbox = fig.transFigure.inverted().transform_bbox(ann.get_bbox_patch().get_bbox())
ann_bbox = fig.transFigure.inverted().transform_bbox(ann.get_bbox_patch().get_window_extent())
ann1_bbox = fig.transFigure.inverted().transform_bbox(ann1.get_bbox_patch().get_window_extent())
x_pad = (ann_bbox.width - text_bbox.width) / 2
y_pad = (ann_bbox.height - text_bbox.height) / 2
ann_pad = .02 # padding around annotation box in figure coords
ax.set_position((ax_bbox.x0, ax_bbox.y0, 1 - max(ann_bbox.width, ann1_bbox.width) - ax_bbox.x0 - ann_pad, ax_bbox.height))
ann.set_position((1 - ann_pad, ax_bbox.y1 - y_pad))
ann1.set_position((1 - ann_pad, ax_bbox.y1 - y_pad - ann_pad - ann_bbox.height))
